From af24a4ea4c25c77f380ffc9c567549e247cf56e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 3 Apr 2024 16:17:08 +0200 Subject: [PATCH] Update xK --- xK-master.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/xK-master.nix b/xK-master.nix index eb272b9..2642bba 100644 --- a/xK-master.nix +++ b/xK-master.nix @@ -108,10 +108,33 @@ pkgs.stdenv.mkDerivation rec { ''; }; + xN = pkgs.buildGoModule rec { + _pname = "xN"; + pname = pkgs.lib.strings.toLower _pname; + inherit version src doCheck meta; + + modRoot = "./${_pname}/"; + vendorHash = null; + + # This invokes a premature build that may miss compiler flags. + preBuild = '' + make + ''; + + ldflags = [ "-X 'main.projectVersion=${_version}'" ]; + + postInstall = '' + mkdir -p $out/share/man/man1 + mv xN.1 $out/share/man/man1 + ''; + }; + # While we can't include them in this derivation, we can link to them. postInstall = pkgs.lib.optionals full '' makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public makeWrapper ${xS}/bin/xS $out/bin/xS + makeWrapper ${xN}/bin/xN $out/bin/xN + ln -s ${xS}/share/man/man1/* ${xN}/share/man/man1/* $out/share/man/man1 ''; doCheck = true;