Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git URLs are missing the host in flake.lock #3361

Closed
erictapen opened this issue Feb 16, 2020 · 1 comment
Closed

Git URLs are missing the host in flake.lock #3361

erictapen opened this issue Feb 16, 2020 · 1 comment
Assignees

Comments

@erictapen
Copy link
Member

Observed

I have this simple flake.nix:

{
  edition = 201909;

  description = "Reproduce a bug";

  inputs = {
    nixos-mailserver = {
      type = "git";
      url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git";
      flake = false;
    };
  };

  outputs = { self, nixos-mailserver }: rec {

    packages.x86_64-linux.test = builtins.derivation {
      name = "hello";
      system = "x86_64-linux";
      builder = "/bin/sh";
      args = [ "-c" "echo \"${nixos-mailserver}\" > $out" ];
    };
    defaultPackage.x86_64-linux = packages.x86_64-linux.test;

  };

}

Running the latest commit from the flakes branch, I get the following flake.lock when running nix flake update --recreate-lock-file:

{
  "inputs": {
    "nixos-mailserver": {
      "info": {
        "lastModified": 1576658032,
        "narHash": "sha256-Ka8FeMF6S9RXLUh8gB3CZiYTdu9Fh3Vwp3EI15PJ3Ag=",
        "revCount": 400
      },
      "inputs": {},
      "locked": {
        "ref": "master",
        "rev": "7bda4c4f110da5134ef9de5efe5d7e6f66bab6e6",
        "type": "git",
        "url": "https:///simple-nixos-mailserver/nixos-mailserver.git"
      },
      "original": {
        "type": "git",
        "url": "https:///simple-nixos-mailserver/nixos-mailserver.git"
      }
    }
  },
  "version": 4
}

Notice the missing gitlab.com in the URLs. This is of course causing a build failure later in the process.

Expected

The URL should contain gitlab.com. I should at least get an error, if I'm doing it something wrong in flake.nix.

@edolstra edolstra self-assigned this Feb 17, 2020
edolstra added a commit that referenced this issue Feb 18, 2020
@erictapen
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants