Skip to content

Commit

Permalink
Switch to flake-parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sridhar Ratnakumar committed Aug 23, 2022
1 parent e2b2f65 commit 3a042bf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 32 deletions.
46 changes: 32 additions & 14 deletions flake.lock

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

34 changes: 16 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
# 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";

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 3a042bf

Please sign in to comment.