-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
31 lines (28 loc) · 833 Bytes
/
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
{
description = "nix-patcher is a tool for patching Nix flake inputs, semi-automatically.";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
systems = nixpkgs.legacyPackages.x86_64-linux.go.meta.platforms;
lib = nixpkgs.lib;
in
{
packages = lib.genAttrs systems (sys:
let
pkgs = nixpkgs.legacyPackages.${sys};
in
{
nix-patcher = pkgs.callPackage ./patcher.nix {
nix = pkgs.nixVersions.nix_2_18; # "nix flake update" arguments changed...
};
}
);
apps = lib.genAttrs systems (sys:
let selfpkgs = self.packages.${sys};
in {
default.type = "app";
default.program = lib.getExe selfpkgs.nix-patcher;
}
);
};
}