-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
31 lines (27 loc) · 853 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
{
inputs = { systems.url = "github:nix-systems/default"; };
outputs = { self, nixpkgs, systems }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
compress-mpq-drv = pkgs:
pkgs.stdenv.mkDerivation {
name = "compress-mpq";
src = self;
buildInputs = [ pkgs.gnumake ];
buildPhase = "make compress-mpq";
installPhase = "install -Dt $out/bin compress-mpq";
};
in rec {
packages = eachSystem (system: rec {
compress-mpq = compress-mpq-drv (import nixpkgs { inherit system; });
default = compress-mpq;
});
apps = eachSystem (system: rec {
compress-mpq = {
program = "${packages.${system}.compress-mpq}/bin/compress-mpq";
type = "app";
};
default = compress-mpq;
});
};
}