Update dependencies

This commit is contained in:
Charlotte Van Petegem 2021-05-12 11:16:34 +02:00
parent 2570a1d661
commit fa553e1561
No known key found for this signature in database
GPG key ID: 019E764B7184435A
9 changed files with 212 additions and 324 deletions

View file

@ -1,159 +0,0 @@
From 456aa2db499409ab500d98c464b3321d4b7cecc3 Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Thu, 15 Apr 2021 15:40:20 +0200
Subject: [PATCH 1/2] nixos-rebuild: Allow remote building when using flakes
---
.../linux/nixos-rebuild/nixos-rebuild.sh | 65 +++++++++++++++----
1 file changed, 53 insertions(+), 12 deletions(-)
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
index 5874f334fedb9..6e31e174c849a 100644
--- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
+++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
@@ -214,6 +214,49 @@ nixBuild() {
fi
}
+nixFlakeBuild() {
+ if [ -z "$buildHost" ]; then
+ nix build "$@" --out-link "${tmpDir}/result"
+ readlink -f "${tmpDir}/result"
+ else
+ local attr="$1"
+ shift 1
+ local evalArgs=()
+ local buildArgs=()
+ while [ "$#" -gt 0 ]; do
+ local i="$1"; shift 1
+ case "$i" in
+ --recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file)
+ evalArgs+=("$i")
+ ;;
+ --update-input)
+ local j="$1"; shift 1
+ evalArgs+=("$i" "$j")
+ ;;
+ --override-input)
+ local j="$1"; shift 1
+ local k="$1"; shift 1
+ evalArgs+=("$i" "$j" "$k")
+ ;;
+ *)
+ buildArgs+=("$i")
+ ;;
+ esac
+ done
+
+ local drv="$(nix "${flakeFlags[@]}" eval --raw "${attr}.drvPath" "${evalArgs[@]}" "${extraBuildArgs[@]}")"
+ if [ -a "$drv" ]; then
+ NIX_SSHOPTS=$SSHOPTS nix "${flakeFlags[@]}" copy --derivation --to "ssh://$buildHost" "$drv"
+ # The 'nix-command flakes' part in "${flakeFlags[@]}" is seen as two separate args over SSH
+ buildHostCmd nix --experimental-features "'nix-command flakes'" build "${buildArgs[@]}" --out-link "${tmpDir}/result" "$drv"
+ buildHostCmd readlink -f "${tmpDir}/result"
+ else
+ echo "nix eval failed"
+ exit 1
+ fi
+ fi
+}
+
if [ -z "$action" ]; then showSyntax; fi
@@ -315,8 +358,14 @@ fi
tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX)
SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60"
+if [ -n "$buildHost" -a -n "$flake" ]; then
+ buildHostCmd mkdir -p "$tmpDir"
+fi
cleanup() {
+ if [ -n "$buildHost" -a -n "$flake" ]; then
+ buildHostCmd rm -rf "$tmpDir"
+ fi
for ctrl in "$tmpDir"/ssh-*; do
ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true
done
@@ -418,10 +467,7 @@ if [ -z "$rollback" ]; then
if [[ -z $flake ]]; then
pathToConfig="$(nixBuild '<nixpkgs/nixos>' --no-out-link -A system "${extraBuildFlags[@]}")"
else
- outLink=$tmpDir/result
- nix "${flakeFlags[@]}" build "$flake#$flakeAttr.config.system.build.toplevel" \
- "${extraBuildFlags[@]}" "${lockFlags[@]}" --out-link $outLink
- pathToConfig="$(readlink -f $outLink)"
+ pathToConfig="$(nixFlakeBuild "$flake#$flakeAttr.config.system.build.toplevel" "${extraBuildFlags[@]}" "${lockFlags[@]}")"
fi
copyToTarget "$pathToConfig"
targetHostCmd nix-env -p "$profile" --set "$pathToConfig"
@@ -429,24 +475,19 @@ if [ -z "$rollback" ]; then
if [[ -z $flake ]]; then
pathToConfig="$(nixBuild '<nixpkgs/nixos>' -A system -k "${extraBuildFlags[@]}")"
else
- nix "${flakeFlags[@]}" build "$flake#$flakeAttr.config.system.build.toplevel" "${extraBuildFlags[@]}" "${lockFlags[@]}"
- pathToConfig="$(readlink -f ./result)"
+ pathToConfig="$(nixFlakeBuild "$flake#$flakeAttr.config.system.build.toplevel" "${extraBuildFlags[@]}" "${lockFlags[@]}")"
fi
elif [ "$action" = build-vm ]; then
if [[ -z $flake ]]; then
pathToConfig="$(nixBuild '<nixpkgs/nixos>' -A vm -k "${extraBuildFlags[@]}")"
else
- nix "${flakeFlags[@]}" build "$flake#$flakeAttr.config.system.build.vm" \
- "${extraBuildFlags[@]}" "${lockFlags[@]}"
- pathToConfig="$(readlink -f ./result)"
+ pathToConfig="$(nixFlakeBuild "$flake#$flakeAttr.config.system.build.vm" "${extraBuildFlags[@]}" "${lockFlags[@]}")"
fi
elif [ "$action" = build-vm-with-bootloader ]; then
if [[ -z $flake ]]; then
pathToConfig="$(nixBuild '<nixpkgs/nixos>' -A vmWithBootLoader -k "${extraBuildFlags[@]}")"
else
- nix "${flakeFlags[@]}" build "$flake#$flakeAttr.config.system.build.vmWithBootLoader" \
- "${extraBuildFlags[@]}" "${lockFlags[@]}"
- pathToConfig="$(readlink -f ./result)"
+ pathToConfig="$(nixFlakeBuild "$flake#$flakeAttr.config.system.build.vmWithBootLoader" "${extraBuildFlags[@]}" "${lockFlags[@]}")"
fi
else
showSyntax
From fa827f3f624659d822666bc79d36534d6d3ea9d1 Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Fri, 16 Apr 2021 12:42:26 +0200
Subject: [PATCH 2/2] nixos-rebuild: Use old-style nix command when building
flake on a remote host
---
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
index 6e31e174c849a..01d0fa823b9b5 100644
--- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
+++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
@@ -247,9 +247,7 @@ nixFlakeBuild() {
local drv="$(nix "${flakeFlags[@]}" eval --raw "${attr}.drvPath" "${evalArgs[@]}" "${extraBuildArgs[@]}")"
if [ -a "$drv" ]; then
NIX_SSHOPTS=$SSHOPTS nix "${flakeFlags[@]}" copy --derivation --to "ssh://$buildHost" "$drv"
- # The 'nix-command flakes' part in "${flakeFlags[@]}" is seen as two separate args over SSH
- buildHostCmd nix --experimental-features "'nix-command flakes'" build "${buildArgs[@]}" --out-link "${tmpDir}/result" "$drv"
- buildHostCmd readlink -f "${tmpDir}/result"
+ buildHostCmd nix-store -r "$drv" "${buildArgs[@]}"
else
echo "nix eval failed"
exit 1
@@ -358,14 +356,8 @@ fi
tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX)
SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60"
-if [ -n "$buildHost" -a -n "$flake" ]; then
- buildHostCmd mkdir -p "$tmpDir"
-fi
cleanup() {
- if [ -n "$buildHost" -a -n "$flake" ]; then
- buildHostCmd rm -rf "$tmpDir"
- fi
for ctrl in "$tmpDir"/ssh-*; do
ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true
done

View file

@ -1,136 +0,0 @@
From 66f9ad192710d18d44322f49c87bba64d2beec11 Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Fri, 16 Apr 2021 18:40:48 +0200
Subject: [PATCH 1/2] zeroad: Split data from binaries again
The rootdir patch was lost in the update to 0.0.24b. Adding it allows
hydra to build the game. It can't when the binaries depend on the data
since the data is too big for hydra.
---
pkgs/games/0ad/game.nix | 10 +++-----
pkgs/games/0ad/rootdir_env.patch | 39 ++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 7 deletions(-)
create mode 100644 pkgs/games/0ad/rootdir_env.patch
diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix
index bb3b7c0138aff..81965b116be67 100644
--- a/pkgs/games/0ad/game.nix
+++ b/pkgs/games/0ad/game.nix
@@ -2,7 +2,7 @@
, pkg-config, spidermonkey_78, boost, icu, libxml2, libpng, libsodium
, libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc
, openal, libGLU, libGL, xorgproto, libX11, libXcursor, nspr, SDL2
-, gloox, nvidia-texture-tools, zeroad-data
+, gloox, nvidia-texture-tools
, withEditor ? true, wxGTK
}:
@@ -50,6 +50,8 @@ stdenv.mkDerivation rec {
"-I${fmt.dev}/include"
];
+ patches = [ ./rootdir_env.patch ];
+
configurePhase = ''
# Delete shipped libraries which we don't need.
rm -rf libraries/source/{enet,miniupnpc,nvtt,spidermonkey}
@@ -62,7 +64,6 @@ stdenv.mkDerivation rec {
${lib.optionalString withEditor "--enable-atlas"} \
--bindir="$out"/bin \
--libdir="$out"/lib/0ad \
- --datadir="$out"/share/0ad/data \
--without-tests \
-j $NIX_BUILD_CORES
popd
@@ -85,11 +86,6 @@ stdenv.mkDerivation rec {
# Copy l10n data.
install -Dm755 -t $out/share/0ad/data/l10n binaries/data/l10n/*
- # Link in game data from package
- ln -s ${zeroad-data}/share/0ad/data/config $out/share/0ad/data/config
- ln -s ${zeroad-data}/share/0ad/data/mods $out/share/0ad/data/mods
- ln -s ${zeroad-data}/share/0ad/data/tools $out/share/0ad/data/tools
-
# Copy libraries.
install -Dm644 -t $out/lib/0ad binaries/system/*.so
diff --git a/pkgs/games/0ad/rootdir_env.patch b/pkgs/games/0ad/rootdir_env.patch
new file mode 100644
index 0000000000000..95463c7e2df46
--- /dev/null
+++ b/pkgs/games/0ad/rootdir_env.patch
@@ -0,0 +1,39 @@
+diff --git a/source/ps/GameSetup/Paths.cpp b/source/ps/GameSetup/Paths.cpp
+index 474364e..bf084b4 100644
+--- a/source/ps/GameSetup/Paths.cpp
++++ b/source/ps/GameSetup/Paths.cpp
+@@ -155,32 +155,8 @@ Paths::Paths(const CmdLineArgs& args)
+
+ /*static*/ OsPath Paths::Root(const OsPath& argv0)
+ {
+-#if OS_ANDROID
+- return OsPath("/sdcard/0ad"); // TODO: this is kind of bogus
+-#else
+-
+- // get full path to executable
+- OsPath pathname = sys_ExecutablePathname(); // safe, but requires OS-specific implementation
+- if(pathname.empty()) // failed, use argv[0] instead
+- {
+- errno = 0;
+- pathname = wrealpath(argv0);
+- if(pathname.empty())
+- WARN_IF_ERR(StatusFromErrno());
+- }
+-
+- // make sure it's valid
+- if(!FileExists(pathname))
+- {
+- LOGERROR("Cannot find executable (expected at '%s')", pathname.string8());
+- WARN_IF_ERR(StatusFromErrno());
+- }
+-
+- for(size_t i = 0; i < 2; i++) // remove "system/name.exe"
+- pathname = pathname.Parent();
+- return pathname;
+-
+-#endif
++ UNUSED2(argv0);
++ return OsPath(getenv("ZEROAD_ROOTDIR"));
+ }
+
+ /*static*/ OsPath Paths::RootData(const OsPath& argv0)
From 8d6375ba029851c053388ff95ed445d2ae0a56cc Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Fri, 16 Apr 2021 18:42:32 +0200
Subject: [PATCH 2/2] zeroad: Add myself as a maintainer
---
pkgs/games/0ad/data.nix | 1 +
pkgs/games/0ad/game.nix | 1 +
2 files changed, 2 insertions(+)
diff --git a/pkgs/games/0ad/data.nix b/pkgs/games/0ad/data.nix
index 5cb28b3f3bd63..9533af21b15d1 100644
--- a/pkgs/games/0ad/data.nix
+++ b/pkgs/games/0ad/data.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
description = "A free, open-source game of ancient warfare -- data files";
homepage = "https://play0ad.com/";
license = licenses.cc-by-sa-30;
+ maintainers = with maintainers; [ chvp ];
platforms = platforms.linux;
hydraPlatforms = [];
};
diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix
index 81965b116be67..feaf4347329c4 100644
--- a/pkgs/games/0ad/game.nix
+++ b/pkgs/games/0ad/game.nix
@@ -101,6 +101,7 @@ stdenv.mkDerivation rec {
gpl2 lgpl21 mit cc-by-sa-30
licenses.zlib # otherwise masked by pkgs.zlib
];
+ maintainers = with maintainers; [ chvp ];
platforms = subtractLists platforms.i686 platforms.linux;
};
}

129
patches/122247.patch Normal file
View file

@ -0,0 +1,129 @@
From 9865b13d73a1c01b43a039edd58e0eeba90d61e6 Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Sat, 8 May 2021 23:55:56 +0200
Subject: [PATCH 1/2] eid-mw: 4.4.27 -> 5.0.14
---
pkgs/tools/security/eid-mw/default.nix | 65 +++++++++++++++-----------
1 file changed, 38 insertions(+), 27 deletions(-)
diff --git a/pkgs/tools/security/eid-mw/default.nix b/pkgs/tools/security/eid-mw/default.nix
index cbe56694da1421..d943274a98e9b3 100644
--- a/pkgs/tools/security/eid-mw/default.nix
+++ b/pkgs/tools/security/eid-mw/default.nix
@@ -1,24 +1,36 @@
-{ lib, stdenv, fetchFromGitHub
-, autoreconfHook, pkg-config
-, gtk3, nssTools, pcsclite
-, libxml2, libproxy
-, openssl, curl
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, autoconf-archive
+, pkg-config
, makeWrapper
-, substituteAll }:
+, curl
+, gtk3
+, libassuan
+, libbsd
+, libproxy
+, libxml2
+, openssl
+, p11-kit
+, pcsclite
+, nssTools
+, substituteAll
+}:
stdenv.mkDerivation rec {
pname = "eid-mw";
- version = "4.4.27";
+ version = "5.0.14";
src = fetchFromGitHub {
rev = "v${version}";
- sha256 = "17lw8iwp7h5cs3db80sysr84ffi333cf2vrhncs9l6hy6glfl2v1";
+ sha256 = "1hyxsbxjjn9hh5p7jlcfb5yplf3n8dg49dfgi8fjp95phis3gbd4";
repo = "eid-mw";
owner = "Fedict";
};
- nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
- buildInputs = [ gtk3 pcsclite libxml2 libproxy curl openssl ];
+ nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config makeWrapper ];
+ buildInputs = [ curl gtk3 libassuan libbsd libproxy libxml2 openssl p11-kit pcsclite ];
preConfigure = ''
mkdir openssl
ln -s ${openssl.out}/lib openssl
@@ -27,30 +39,29 @@ stdenv.mkDerivation rec {
export SSL_PREFIX=$(realpath openssl)
substituteInPlace plugins_tools/eid-viewer/Makefile.in \
--replace "c_rehash" "openssl rehash"
- '';
+ '';
+ configureFlags = [ "--disable-pinentry" ];
postPatch = ''
sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac
'';
- configureFlags = [ "--enable-dialogs=yes" ];
-
postInstall =
- let
- eid-nssdb-in = substituteAll {
- inherit (stdenv) shell;
- isExecutable = true;
- src = ./eid-nssdb.in;
- };
- in
- ''
- install -D ${eid-nssdb-in} $out/bin/eid-nssdb
- substituteInPlace $out/bin/eid-nssdb \
- --replace "modutil" "${nssTools}/bin/modutil"
+ let
+ eid-nssdb-in = substituteAll {
+ inherit (stdenv) shell;
+ isExecutable = true;
+ src = ./eid-nssdb.in;
+ };
+ in
+ ''
+ install -D ${eid-nssdb-in} $out/bin/eid-nssdb
+ substituteInPlace $out/bin/eid-nssdb \
+ --replace "modutil" "${nssTools}/bin/modutil"
- rm $out/bin/about-eid-mw
- wrapProgram $out/bin/eid-viewer --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
- '';
+ rm $out/bin/about-eid-mw
+ wrapProgram $out/bin/eid-viewer --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
+ '';
enableParallelBuilding = true;
From c6b73cfad86428d2fca84c2064a03e4dd48b8c46 Mon Sep 17 00:00:00 2001
From: Charlotte Van Petegem <charlotte@vanpetegem.me>
Date: Sat, 8 May 2021 23:56:10 +0200
Subject: [PATCH 2/2] eid-mw: add chvp as maintainer
---
pkgs/tools/security/eid-mw/default.nix | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkgs/tools/security/eid-mw/default.nix b/pkgs/tools/security/eid-mw/default.nix
index d943274a98e9b3..a104112265730f 100644
--- a/pkgs/tools/security/eid-mw/default.nix
+++ b/pkgs/tools/security/eid-mw/default.nix
@@ -94,6 +94,6 @@ stdenv.mkDerivation rec {
firefox.override { pkcs11Modules = [ pkgs.eid-mw ]; }
'';
platforms = platforms.linux;
- maintainers = with maintainers; [ bfortz ];
+ maintainers = with maintainers; [ bfortz chvp ];
};
}

64
patches/arc-theme.patch Normal file
View file

@ -0,0 +1,64 @@
diff --git a/pkgs/data/themes/arc/default.nix b/pkgs/data/themes/arc/default.nix
index fff5e4bf41a..0ece2d6e0e0 100644
--- a/pkgs/data/themes/arc/default.nix
+++ b/pkgs/data/themes/arc/default.nix
@@ -1,7 +1,8 @@
{ lib, stdenv
, fetchFromGitHub
, sassc
-, autoreconfHook
+, meson
+, ninja
, pkg-config
, gtk3
, gnome
@@ -13,7 +14,7 @@
stdenv.mkDerivation rec {
pname = "arc-theme";
- version = "20210127";
+ version = "20210412";
src = fetchFromGitHub {
owner = "jnsh";
@@ -23,12 +24,15 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
- autoreconfHook
+ meson
+ ninja
pkg-config
sassc
optipng
inkscape
gtk3
+ gnome.gnome-shell
+ cinnamon.cinnamon-common
];
propagatedUserEnvPkgs = [
@@ -43,14 +47,18 @@ stdenv.mkDerivation rec {
export HOME="$NIX_BUILD_ROOT"
'';
- configureFlags = [
- "--with-cinnamon=${cinnamon.cinnamon-common.version}"
- "--with-gnome-shell=${gnome.gnome-shell.version}"
- "--disable-unity"
+ mesonFlags = [
+ "-Dthemes=cinnamon,gnome-shell,gtk2,gtk3,plank,xfwm"
+ "-Dvariants=light,darker,dark,lighter"
+ "-Dtransparency=true"
+ "-Dcinnamon_version=${cinnamon.cinnamon-common.version}"
+ "-Dgnome_shell_version=${lib.elemAt (lib.splitString "-" gnome.gnome-shell.version) 0}"
+ "-Dgtk3_version=${gtk3.version}"
+ "-Dgnome_shell_resource=false"
];
postInstall = ''
- install -Dm644 -t $out/share/doc/${pname} AUTHORS *.md
+ install -Dm644 -t $out/share/doc/${pname} $src/AUTHORS $src/*.md
'';
meta = with lib; {