refine
This commit is contained in:
parent
0e288ce0b1
commit
adf4888d4a
4 changed files with 63 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{pkgs,...}:
|
||||
{pkgs,mypkgs,...}:
|
||||
with pkgs;
|
||||
{
|
||||
xbuild = callPackage ./pkgs/x/xbuild/package.nix {};
|
||||
cedro = callPackage ./pkgs/c/cedro/package.nix {};
|
||||
capnpc = callPackage ./pkgs/c/capnpc/package.nix {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
mypkgs.url = "github:shen390s/my-nix-channel?ref=master";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs}:
|
||||
outputs = { self, nixpkgs, mypkgs}:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
|
@ -14,7 +15,7 @@
|
|||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
import ./default.nix { inherit pkgs; });
|
||||
import ./default.nix { inherit pkgs; inherit mypkgs;});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
46
pkgs/c/capnpc/package.nix
Normal file
46
pkgs/c/capnpc/package.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "capnpc";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "c-capnproto";
|
||||
rev = "master";
|
||||
sha256 = "sha256-U+yUYYvfhPjvADtHsjN5LvOUzFEXZrTmmpqfypf/4Ik=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.capnproto
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cp "$src/CMakePresets.json" .
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cmake --preset=ci-linux_x86_64 -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cmake --build --preset=ci-tests
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/include
|
||||
mkdir -p $out/lib
|
||||
cp build/capnpc-c $out/bin
|
||||
cp build/libCapnC_Runtime.a $out/lib
|
||||
cp lib/capnp_c.h $out/include
|
||||
'';
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
mypkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ let
|
|||
repo = "xbuild";
|
||||
rev = "master";
|
||||
# sha256 = "sha256-DLq7vC+4k2TMy5jKvQkFTy+xZmpvl0+DiWcd7CBVbgw=";
|
||||
sha256 = "sha256-gYIYd3J4mCJJU0yJ+2xL/5URKo+M8T2Q9CWLbxQ2rtQ=";
|
||||
sha256 = "sha256-DD/ErN13ydDwYV5BhF81dJEkDIx1bAFQccDKxjkF+qw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
@ -52,6 +53,15 @@ let
|
|||
pkgs.linux-pam
|
||||
pkgs.libtirpc
|
||||
pkgs.hwloc
|
||||
pkgs.libuv
|
||||
pkgs.readline
|
||||
pkgs.openssl
|
||||
pkgs.libcyaml
|
||||
pkgs.libyaml
|
||||
pkgs.elogind
|
||||
pkgs.sqlite
|
||||
pkgs.python3
|
||||
mypkgs.capnpc
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue