Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions nix/default-arm64.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ let
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
'';
});
pcsclite = (static pkg.pcsclite).overrideAttrs (x: {
configureFlags = [
"--enable-confdir=/etc"
"--enable-usbdropdir=/var/lib/pcsc/drivers"
"--disable-libsystemd"
"--disable-libudev"
"--disable-libusb"
];
buildInputs = [ pkgs.python3 pkgs.dbus ];
});
libcap = (static pkg.libcap).overrideAttrs (x: {
postInstall = ''
mkdir -p "$doc/share/doc/${x.pname}-${x.version}"
Expand All @@ -38,6 +48,7 @@ let
systemd = (static pkg.systemd).overrideAttrs (x: {
outputs = [ "out" "dev" ];
mesonFlags = x.mesonFlags ++ [
"-Dglib=false"
"-Dstatic-libsystemd=true"
];
});
Expand Down Expand Up @@ -68,15 +79,8 @@ let
doCheck = false;
enableParallelBuilding = true;
outputs = [ "out" ];
nativeBuildInputs = with buildPackages; [
autoreconfHook
bash
gitMinimal
pkg-config
python3
which
];
buildInputs = [ glibc glibc.static libcap libseccomp protobufc systemd yajl ];
nativeBuildInputs = [ autoreconfHook bash gitMinimal pkg-config python3 which ];
buildInputs = [ glibc glibc.static glib libcap libseccomp protobufc systemd yajl ];
configureFlags = [ "--enable-static" ]
++ lib.optional (!enableSystemd) [ "--disable-systemd" ];
prePatch = ''
Expand Down
35 changes: 27 additions & 8 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,48 @@ let
libgpgerror = (static pkg.libgpgerror);
libseccomp = (static pkg.libseccomp);
protobufc = (static pkg.protobufc);
glib = (static pkg.glib).overrideAttrs(x: {
glib = (static pkg.glib).overrideAttrs (x: {
outputs = [ "bin" "out" "dev" ];
mesonFlags = [
"-Ddefault_library=static"
"-Ddevbindir=${placeholder ''dev''}/bin"
"-Dgtk_doc=false"
"-Dnls=disabled"
];
postInstall = ''
moveToOutput "share/glib-2.0" "$dev"
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
sed '1i#line 1 "${x.pname}-${x.version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
'';
});
pcsclite = (static pkg.pcsclite).overrideAttrs (x: {
configureFlags = [
"--enable-confdir=/etc"
"--enable-usbdropdir=/var/lib/pcsc/drivers"
"--disable-libsystemd"
"--disable-libudev"
"--disable-libusb"
];
buildInputs = [ pkgs.python3 pkgs.dbus ];
});
libcap = (static pkg.libcap).overrideAttrs(x: {
libcap = (static pkg.libcap).overrideAttrs (x: {
postInstall = ''
mkdir -p "$doc/share/doc/${x.pname}-${x.version}"
cp License "$doc/share/doc/${x.pname}-${x.version}/"
mkdir -p "$pam/lib/security"
mv "$lib"/lib/security "$pam/lib"
'';
});
systemd = (static pkg.systemd).overrideAttrs(x: {
systemd = (static pkg.systemd).overrideAttrs (x: {
outputs = [ "out" "dev" ];
mesonFlags = x.mesonFlags ++ [
"-Dglib=false"
"-Dstatic-libsystemd=true"
];
});
yajl = (static pkg.yajl).overrideAttrs(x: {
yajl = (static pkg.yajl).overrideAttrs (x: {
preConfigure = ''
export CMAKE_STATIC_LINKER_FLAGS="-static"
'';
Expand All @@ -41,9 +59,9 @@ let
};
});

static = pkg: pkg.overrideAttrs(x: {
static = pkg: pkg.overrideAttrs (x: {
doCheck = false;
configureFlags = (x.configureFlags or []) ++ [
configureFlags = (x.configureFlags or [ ]) ++ [
"--without-shared"
"--disable-shared"
];
Expand All @@ -60,7 +78,7 @@ let
enableParallelBuilding = true;
outputs = [ "out" ];
nativeBuildInputs = [ autoreconfHook bash gitMinimal pkg-config python3 which ];
buildInputs = [ glibc glibc.static criu libcap libseccomp protobufc systemd yajl ];
buildInputs = [ glibc glibc.static glib criu libcap libseccomp protobufc systemd yajl ];
configureFlags = [ "--enable-static" ]
++ lib.optional (!enableSystemd) [ "--disable-systemd" ];
prePatch = ''
Expand All @@ -78,4 +96,5 @@ let
install -Dm755 crun $out/bin/crun
'';
};
in self
in
self
8 changes: 4 additions & 4 deletions nix/nixpkgs.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"url": "https://github.com/nixos/nixpkgs",
"rev": "e02ced5c2027a0840e5d22d7bb6e67238f6b5fe9",
"date": "2021-02-17T17:38:12+01:00",
"path": "/nix/store/gvnxnfnikdsnadq9y9kabcshm72b8f0g-nixpkgs",
"sha256": "16x5yj4i0g6d7hqx865fdazdida03r8vyixcn3byxbhb2iv861lv",
"rev": "2a96414d7e350160a33ed0978449c9ff5b5a6eb3",
"date": "2021-07-13T18:21:47+02:00",
"path": "/nix/store/2ai9q8ac6vxb2rrngdz82y8jxnk15cvm-nixpkgs",
"sha256": "1dzrfqdjq3yq5jjskiqflzy58l2xx6059gay9p1k07zrlm1wigy5",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
Expand Down
3 changes: 2 additions & 1 deletion nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ let
url = "${json.url}/archive/${json.rev}.tar.gz";
inherit (json) sha256;
});
in nixpkgs
in
nixpkgs