nix flake

This commit is contained in:
Jeremy Wall 2022-05-14 16:46:02 -04:00
parent 1f25fa672f
commit c0798513c7
3 changed files with 138 additions and 3 deletions

129
flake.lock generated Normal file
View File

@ -0,0 +1,129 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1652372896,
"narHash": "sha256-lURGussfF3mGrFPQT3zgW7+RC0pBhbHzco0C7I+ilow=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0d347c56f6f41de822a4f4c7ff5072f3382db121",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1651574473,
"narHash": "sha256-wQhFORvRjo8LB2hTmETmv6cbyKGDPbfWqvZ/0chnDE4=",
"owner": "nix-community",
"repo": "naersk",
"rev": "f21309b38e1da0d61b881b6b6d41b81c1aed4e1d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1652252629,
"narHash": "sha256-SvT64apetqc8P5nYp1/fOZvUmHUPdPFUZbhSpKy+1aI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2fc6856824cb87742177eefc8dd534bdb6c3439",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1652487699,
"narHash": "sha256-2RajAmUE+13kBh7ToxJC5ZpTYuJopZPMZig4hErZcBk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "be2ceab96f3aee5e586a427a2d28331ccbd4c7da",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1652410199,
"narHash": "sha256-R9pEim8k6GIYadmyTRh2jpvUDkFJ857DhUwdnJUCf/o=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fe0bc0004e5db3f8034021b4968b26b29fd9edef",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -21,14 +21,19 @@
overlays = [ rust-overlay.overlay ];
pkgs = import nixpkgs { inherit system overlays; };
naersk-lib = naersk.lib."${system}";
in
{
defaultPackage = with pkgs;
ucg = with pkgs;
naersk-lib.buildPackage rec {
pname = "ucg";
version = "0.7.2";
src = ./.;
cargoBuildOptions = opts: opts ++ ["-p" "${pname}" ];
};
in
{
defaultPackage = ucg;
defaultApp = {
type = "app";
program = "${ucg}/bin/ucg";
};
});
}

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/v90fwz0dfbnlghwkhahfq5fjd8yk39m7-ucg-0.7.2