tweak flake

This commit is contained in:
Robin Appelman 2022-08-21 23:06:26 +02:00
commit 140830f186
2 changed files with 21 additions and 21 deletions

27
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1655042882, "lastModified": 1659610603,
"narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", "narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", "rev": "c6a45e4277fa58abd524681466d3450f896dc094",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -21,8 +21,8 @@
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 0, "lastModified": 0,
"narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", "narHash": "sha256-ogcrJszrCg23/mIcLEOUCMKgdWlqMJ4QqezvX0V2ZQk=",
"path": "/nix/store/dycwkjqxlc93s7ch3c932d0f9xvfch33-source", "path": "/nix/store/f6y01zll9swq7rvf82ya4r3hjs9j93py-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -32,13 +32,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 0, "lastModified": 1661094678,
"narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", "narHash": "sha256-RtaVb6SqfrgCi20gdju1ogS3u1ocyLnhsgolazrCwL0=",
"path": "/nix/store/dycwkjqxlc93s7ch3c932d0f9xvfch33-source", "owner": "NixOS",
"type": "path" "repo": "nixpkgs",
"rev": "23534df34c1c499a6c82ce690df06d8c6e4e759d",
"type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "release-22.05",
"type": "indirect" "type": "indirect"
} }
}, },
@ -51,11 +54,11 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1656065134, "lastModified": 1659877975,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,6 +2,7 @@
inputs = { inputs = {
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk"; naersk.url = "github:nix-community/naersk";
nixpkgs.url = "nixpkgs/release-22.05";
}; };
outputs = { outputs = {
@ -11,22 +12,18 @@
naersk, naersk,
}: }:
utils.lib.eachDefaultSystem (system: let utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages."${system}"; pkgs = (import nixpkgs) {
naersk-lib = naersk.lib."${system}"; inherit system;
};
naersk' = pkgs.callPackage naersk {};
in rec { in rec {
# `nix build` # `nix build`
packages.dispenser = naersk-lib.buildPackage { packages.dispenser = naersk'.buildPackage {
pname = "dispenser"; pname = "dispenser";
root = ./.; root = ./.;
}; };
defaultPackage = packages.dispenser; defaultPackage = packages.dispenser;
# `nix run`
apps.dispenser = utils.lib.mkApp {
drv = packages.dispenser;
};
defaultApp = apps.dispenser;
# `nix develop` # `nix develop`
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [rustc cargo bacon]; nativeBuildInputs = with pkgs; [rustc cargo bacon];