support build for all nixpkgs default systems

This commit is contained in:
Thorsten Schindler 2021-09-11 21:41:38 +02:00
parent 8c5cd198e0
commit 14a828618b
No known key found for this signature in database
GPG key ID: 922952DA3C68691E
2 changed files with 44 additions and 18 deletions

View file

@ -17,7 +17,23 @@
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"utils": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},

View file

@ -3,27 +3,37 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs }: {
packages.x86_64-linux.p2pool = with import nixpkgs { system = "x86_64-linux";}; stdenv.mkDerivation {
pname = "p2pool";
version = "0.0.1";
src = self;
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
rec {
packages = utils.lib.flattenTree {
p2pool = pkgs.stdenv.mkDerivation {
pname = "p2pool";
version = "0.0.1";
src = self;
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = builtins.attrValues {
inherit (pkgs) cmake pkg-config;
};
buildInputs = [
libuv zeromq
libsodium gss
];
buildInputs = builtins.attrValues {
inherit (pkgs) libuv zeromq libsodium gss;
};
installPhase = ''
mkdir -p $out/bin
cp -r ./p2pool $out/bin/
'';
};
installPhase = ''
mkdir -p $out/bin
cp -r ./p2pool $out/bin/
'';
};
};
defaultPackage.x86_64-linux = self.packages.x86_64-linux.p2pool;
};
defaultPackage = packages.p2pool;
}
);
}