Skip to content

Commit

Permalink
Merge pull request #176 from srid/flake-parts
Browse files Browse the repository at this point in the history
Switch to `flake-parts`
  • Loading branch information
zimbatm authored Aug 23, 2022
2 parents e2b2f65 + becf50f commit ef8f965
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
29 changes: 17 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
# To update all inputs:
# $ nix flake update --recreate-lock-file
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.flake-parts.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, flake-utils }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
nixpkgs' = nixpkgs.legacyPackages.${system};
pkgs = import self {
inherit system;
inputs = null;
nixpkgs = nixpkgs';
};
in
{
defaultPackage = pkgs.default;

packages = pkgs;
outputs = { self, nixpkgs, flake-parts }@inputs:
flake-parts.lib.mkFlake { inherit self; } {
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { system, pkgs, ... }:
let
packages = import ./. {
inherit system;
inputs = null;
nixpkgs = pkgs;
};
in
{
inherit packages;

devShell = pkgs.devShell;
}
);
devShells.default = packages.devShell;
};
};
}

0 comments on commit ef8f965

Please sign in to comment.