Skip to content

Commit

Permalink
nix run -f channel:nixos-20.03
Browse files Browse the repository at this point in the history
Switch from nix `channel:nixpkgs-unstable` to `channel:nixos-20.03` for better stability.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
  • Loading branch information
hswong3i committed Jun 29, 2020
1 parent 304e570 commit 4016ced
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -128,7 +128,7 @@ git-version.h:
fi

nixpkgs:
@nix run -f channel:nixpkgs-unstable nix-prefetch-git -c nix-prefetch-git \
@nix run -f channel:nixos-20.03 nix-prefetch-git -c nix-prefetch-git \
--no-deepClone https://github.com/nixos/nixpkgs > nix/nixpkgs.json

dist-hook:
Expand Down
14 changes: 10 additions & 4 deletions nix/default.nix
Expand Up @@ -14,8 +14,10 @@ let
mv "$lib"/lib/security "$pam/lib"
'';
});
systemd = pkg.systemd.overrideAttrs(x: {
mesonFlags = x.mesonFlags ++ [ "-Dstatic-libsystemd=true" ];
systemd = (static pkg.systemd).overrideAttrs(x: {
mesonFlags = x.mesonFlags ++ [
"-Dstatic-libsystemd=true"
];
postFixup = ''
${x.postFixup}
sed -ri "s;$out/(.*);$nukedRef/\1;g" $lib/lib/libsystemd.a
Expand All @@ -31,8 +33,11 @@ let
});

static = pkg: pkg.overrideAttrs(x: {
configureFlags = (x.configureFlags or []) ++
[ "--without-shared" "--disable-shared" ];
doCheck = false;
configureFlags = (x.configureFlags or []) ++ [
"--without-shared"
"--disable-shared"
];
dontDisableStatic = true;
enableSharedExecutables = false;
enableStatic = true;
Expand All @@ -46,6 +51,7 @@ let
nativeBuildInputs = [ autoreconfHook git go-md2man pkg-config python3 ];
buildInputs = [ criu glibc glibc.static libcap libseccomp protobufc systemd yajl ];
prePatch = ''
export CFLAGS='-static'
export LDFLAGS='-s -w -static-libgcc -static'
export EXTRA_LDFLAGS='-s -w -linkmode external -extldflags "-static -lm"'
export CRUN_LDFLAGS='-all-static'
Expand Down
11 changes: 4 additions & 7 deletions nix/nixpkgs.json
@@ -1,10 +1,7 @@
{
"url": "https://github.com/nixos/nixpkgs",
"rev": "78e324d2726127828a15f87a75b4d3199a8955ec",
"date": "2020-06-16T18:23:14-07:00",
"path": "/nix/store/bwhp0061k3fk00j8fskpfak261jdcjl6-nixpkgs",
"sha256": "1j58aa9ngdmvbnds4x4a497nynj390dzqyb5yrvmhjc7k9anq6jm",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
"rev": "87c5724af9f61be5e77034229078960690c1abe2",
"date": "2020-06-28T22:14:24+01:00",
"sha256": "1vg6iajb945b33nx674nnask6wai8zkjd4m0i9fcpdkwhwr0s46s",
"fetchSubmodules": false
}

0 comments on commit 4016ced

Please sign in to comment.