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

View file

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