From ffd47e132bb1b1fc64bfdf84e31229e291ed4729 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 27 Nov 2024 22:27:30 +0100 Subject: [PATCH 01/10] zod-engine: expose pname --- pkgs/by-name/zo/zod/package.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/zo/zod/package.nix b/pkgs/by-name/zo/zod/package.nix index e0c2031dde250..f4add7f46c0ab 100644 --- a/pkgs/by-name/zo/zod/package.nix +++ b/pkgs/by-name/zo/zod/package.nix @@ -16,7 +16,7 @@ , substituteAll }: let - name = "zod-engine"; + pname = "zod-engine"; version = "2011-09-06"; src = fetchzip { url = "mirror://sourceforge/zod/linux_releases/zod_linux-${version}.tar.gz"; @@ -41,7 +41,7 @@ let NIX_LDFLAGS = "-L${libmysqlclient}/lib/mysql"; zod_engine = stdenv.mkDerivation { inherit version src postPatch nativeBuildInputs buildInputs hardeningDisable NIX_LDFLAGS; - pname = "${name}-engine"; + pname = "${pname}-engine"; enableParallelBuilding = true; preBuild = "cd zod_src"; installPhase = '' @@ -52,7 +52,7 @@ let }; zod_map_editor = stdenv.mkDerivation { inherit version src postPatch nativeBuildInputs buildInputs hardeningDisable NIX_LDFLAGS; - pname = "${name}-map_editor"; + pname = "${pname}-map_editor"; enableParallelBuilding = true; preBuild = "cd zod_src"; makeFlags = [ "map_editor" ]; @@ -64,7 +64,7 @@ let }; zod_launcher = stdenv.mkDerivation { inherit version src nativeBuildInputs buildInputs zod_engine zod_map_editor; - pname = "${name}-launcher"; + pname = "${pname}-launcher"; # This is necessary because the zod_launcher has terrible fixed-width window # the Idea is to apply the scalingFactor to all positions and sizes and I tested 1,2,3 and 4 # 2,3,4 look acceptable on my 4k monitor and 1 is unreadable. @@ -86,7 +86,7 @@ let install -m755 zod_launcher $out/bin ''; }; - zod_assets = runCommandLocal "${name}-assets" {} '' + zod_assets = runCommandLocal "${pname}-assets" {} '' mkdir -p $out/usr/lib/commander-zod{,blank_maps} cp -r ${src}/assets $out/usr/lib/commander-zod/assets for i in ${src}/*.map ${src}/*.txt; do @@ -98,7 +98,7 @@ let ''; in symlinkJoin { - inherit name; + inherit pname version; paths = [ zod_engine zod_launcher From 8f6c2ad7d12bd32ea1fa2603d8f80444d4d040f3 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 28 Nov 2024 00:09:04 +0100 Subject: [PATCH 02/10] zitadel: use pname --- pkgs/by-name/zi/zitadel/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/zi/zitadel/package.nix b/pkgs/by-name/zi/zitadel/package.nix index d744ed153c838..d4181af043402 100644 --- a/pkgs/by-name/zi/zitadel/package.nix +++ b/pkgs/by-name/zi/zitadel/package.nix @@ -95,7 +95,7 @@ let }; in buildGoModule rec { - name = "zitadel"; + pname = "zitadel"; inherit version; src = zitadelRepo; From 7257077fe55f1fdb42e8beec0138ba7f96c8130f Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 28 Nov 2024 18:33:38 +0100 Subject: [PATCH 03/10] zathura: expose version --- pkgs/applications/misc/zathura/wrapper.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/zathura/wrapper.nix b/pkgs/applications/misc/zathura/wrapper.nix index 4290fff26bcf6..282034cc6b38d 100644 --- a/pkgs/applications/misc/zathura/wrapper.nix +++ b/pkgs/applications/misc/zathura/wrapper.nix @@ -18,7 +18,8 @@ ], }: symlinkJoin { - name = "zathura-with-plugins-${zathura_core.version}"; + inherit (zathura_core) version; + pname = "zathura-with-plugins"; paths = with zathura_core; From 2f46896cb8fd4521e45025d30d1af91951eb86fb Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 28 Nov 2024 19:05:28 +0100 Subject: [PATCH 04/10] xonotic: set pname and version --- pkgs/games/xonotic/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/games/xonotic/default.nix b/pkgs/games/xonotic/default.nix index c3356cc254e41..3977f87f8e939 100644 --- a/pkgs/games/xonotic/default.nix +++ b/pkgs/games/xonotic/default.nix @@ -158,18 +158,16 @@ in rec { rm -rf $(ls | grep -v "^data$" | grep -v "^key_0.d0pk$") ''; meta.hydraPlatforms = []; - passthru.version = version; + inherit version pname; }; xonotic = runCommand "xonotic${variant}-${version}" { - inherit xonotic-unwrapped; + inherit xonotic-unwrapped version; + pname = "${pname}${variant}"; nativeBuildInputs = [ makeWrapper copyDesktopItems ]; desktopItems = [ desktopItem ]; - passthru = { - inherit version; - meta = meta // { - hydraPlatforms = []; - }; + meta = meta // { + hydraPlatforms = []; }; } ('' mkdir -p $out/bin From 0eae5911560d29d186bdff9d84d29d4a085cbe13 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 28 Nov 2024 19:08:31 +0100 Subject: [PATCH 05/10] xmoji: use pname --- pkgs/by-name/xm/xmoji/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/xm/xmoji/package.nix b/pkgs/by-name/xm/xmoji/package.nix index b19a711ae7eb7..3b84f88682cf7 100644 --- a/pkgs/by-name/xm/xmoji/package.nix +++ b/pkgs/by-name/xm/xmoji/package.nix @@ -14,7 +14,7 @@ }: stdenv.mkDerivation (finalAttrs: { - name = "xmoji"; + pname = "xmoji"; version = "0.8"; src = fetchFromGitHub { From d8af5c5da2251f29724fcfc49082a033d85777a4 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 28 Nov 2024 19:17:09 +0100 Subject: [PATCH 06/10] x16.run: set pname and version --- pkgs/by-name/x1/x16/run.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/x1/x16/run.nix b/pkgs/by-name/x1/x16/run.nix index 274e98afecca5..a9f72da4d32c5 100644 --- a/pkgs/by-name/x1/x16/run.nix +++ b/pkgs/by-name/x1/x16/run.nix @@ -22,7 +22,8 @@ let }; in symlinkJoin { - name = "run-x16-${emulator.version}"; + pname = "run-x16"; + inherit (emulator) version; paths = [ emulator From da1f92145527c12446a167f0efdb610b771289cd Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 2 Dec 2024 23:17:54 +0100 Subject: [PATCH 07/10] python3Packages.molbar: use pname instead of name --- pkgs/development/python-modules/molbar/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/molbar/default.nix b/pkgs/development/python-modules/molbar/default.nix index be23018274faa..d2f608a8049cb 100644 --- a/pkgs/development/python-modules/molbar/default.nix +++ b/pkgs/development/python-modules/molbar/default.nix @@ -19,7 +19,7 @@ }: buildPythonPackage rec { - name = "MolBar"; + pname = "MolBar"; version = "1.1.1"; src = fetchgit { From fc34c16e9f1de05ede0bdfb6c7b855e7e16dfb06 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 2 Dec 2024 23:21:07 +0100 Subject: [PATCH 08/10] python3Packages.dscribe: use pname instead of name --- pkgs/development/python-modules/dscribe/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/dscribe/default.nix b/pkgs/development/python-modules/dscribe/default.nix index 59ff3cdd88d32..f2cacd6045247 100644 --- a/pkgs/development/python-modules/dscribe/default.nix +++ b/pkgs/development/python-modules/dscribe/default.nix @@ -11,7 +11,7 @@ }: buildPythonPackage rec { - name = "dscribe"; + pname = "dscribe"; version = "2.1.1"; src = fetchFromGitHub { From 56dcfcd9b4f265a32bc98198e0830d264bbd6085 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 2 Dec 2024 23:24:31 +0100 Subject: [PATCH 09/10] gepetto-gui: expose version and pname --- pkgs/by-name/ge/gepetto-viewer/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/ge/gepetto-viewer/package.nix b/pkgs/by-name/ge/gepetto-viewer/package.nix index 9abddf1ac5811..0270c84daca2f 100644 --- a/pkgs/by-name/ge/gepetto-viewer/package.nix +++ b/pkgs/by-name/ge/gepetto-viewer/package.nix @@ -93,6 +93,8 @@ let plugins: runCommand "gepetto-gui" { + inherit (finalAttrs) version; + pname = "gepetto-gui"; meta = { # can't just "inherit (gepetto-viewer) meta;" because: # error: derivation '/nix/store/…-gepetto-gui.drv' does not have wanted outputs 'bin' From 83ae8e7fc75d9ea6f99ff93d693071499e995695 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 2 Dec 2024 23:38:00 +0100 Subject: [PATCH 10/10] python3Packages.magic: expose version and pname --- pkgs/development/python-modules/magic/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/magic/default.nix b/pkgs/development/python-modules/magic/default.nix index fac5e681fbb83..b37f0d604cf3d 100644 --- a/pkgs/development/python-modules/magic/default.nix +++ b/pkgs/development/python-modules/magic/default.nix @@ -6,9 +6,7 @@ }: buildPythonPackage { - name = pkgs.file.name; - - src = pkgs.file.src; + inherit (pkgs.file) pname version src; patchPhase = '' substituteInPlace python/magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"