-
Notifications
You must be signed in to change notification settings - Fork 6
/
flake.nix
35 lines (30 loc) · 1.09 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
description = "Sandwich";
inputs.gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
inputs.nixpkgsMaster.url = "github:NixOS/nixpkgs/master";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, gitignore, nixpkgs, nixpkgsMaster, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
pkgsMaster = import nixpkgsMaster { inherit system; };
in
{
packages = {
inherit (pkgsMaster) node2nix;
inherit (pkgsMaster.haskell.packages.ghc964) weeder;
test = pkgs.writeShellScriptBin "stack-test" ''
export NIX_PATH=nixpkgs=${pkgs.path}
${pkgs.stack}/bin/stack test
'';
nixpkgsPath = pkgs.writeShellScriptBin "nixpkgsPath.sh" "echo -n ${pkgs.path}";
};
devShells.default = pkgs.mkShell {
buildInputs = [ pkgs.htop ];
};
});
}