From b5e0221e44c6367f7150cb65a4de78e8f29586b9 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 7 Dec 2021 20:40:23 +0100 Subject: [PATCH] treewide: use pname&version instead of name --- pkgs/os-specific/linux/v86d/default.nix | 10 ++++++---- pkgs/os-specific/linux/vendor-reset/default.nix | 4 ++-- pkgs/os-specific/linux/virtualbox/default.nix | 3 ++- .../linux/x86_energy_perf_policy/default.nix | 3 ++- pkgs/servers/openafs/1.8/module.nix | 5 +++-- pkgs/servers/openafs/1.9/module.nix | 5 +++-- pkgs/shells/zsh/zsh-better-npm-completion/default.nix | 2 +- pkgs/shells/zsh/zsh-deer/default.nix | 6 ++---- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/pkgs/os-specific/linux/v86d/default.nix b/pkgs/os-specific/linux/v86d/default.nix index 254abb5838e8..dbc98344c5ec 100644 --- a/pkgs/os-specific/linux/v86d/default.nix +++ b/pkgs/os-specific/linux/v86d/default.nix @@ -5,14 +5,16 @@ , klibc }: -stdenv.mkDerivation rec { - name = "v86d-${version}-${kernel.version}"; - version = "0.1.10"; +let + pversion = "0.1.10"; +in stdenv.mkDerivation rec { + pname = "v86d"; + version = "${pversion}-${kernel.version}"; src = fetchFromGitHub { owner = "mjanusz"; repo = "v86d"; - rev = "v86d-${version}"; + rev = "v86d-${pversion}"; hash = "sha256-95LRzVbO/DyddmPwQNNQ290tasCGoQk7FDHlst6LkbA="; }; diff --git a/pkgs/os-specific/linux/vendor-reset/default.nix b/pkgs/os-specific/linux/vendor-reset/default.nix index 8f1bde7ecbd5..e1395bd33c07 100644 --- a/pkgs/os-specific/linux/vendor-reset/default.nix +++ b/pkgs/os-specific/linux/vendor-reset/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchFromGitHub, kernel, lib }: stdenv.mkDerivation rec { - name = "vendor-reset-${version}-${kernel.version}"; - version = "unstable-2021-02-16"; + pname = "vendor-reset"; + version = "unstable-2021-02-16-${kernel.version}"; src = fetchFromGitHub { owner = "gnif"; diff --git a/pkgs/os-specific/linux/virtualbox/default.nix b/pkgs/os-specific/linux/virtualbox/default.nix index f795d36207a8..3aae58933c8f 100644 --- a/pkgs/os-specific/linux/virtualbox/default.nix +++ b/pkgs/os-specific/linux/virtualbox/default.nix @@ -1,7 +1,8 @@ { stdenv, virtualbox, kernel }: stdenv.mkDerivation { - name = "virtualbox-modules-${virtualbox.version}-${kernel.version}"; + pname = "virtualbox-modules"; + version = "${virtualbox.version}-${kernel.version}"; src = virtualbox.modsrc; hardeningDisable = [ "fortify" "pic" "stackprotector" diff --git a/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix b/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix index 4b57ed4ceae5..d636f928f249 100644 --- a/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix +++ b/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, kernel }: stdenv.mkDerivation { - name = "x86_energy_perf_policy-${kernel.version}"; + pname = "x86_energy_perf_policy"; + version = kernel.version; src = kernel.src; diff --git a/pkgs/servers/openafs/1.8/module.nix b/pkgs/servers/openafs/1.8/module.nix index f8b2d222af17..02966d2ac70d 100644 --- a/pkgs/servers/openafs/1.8/module.nix +++ b/pkgs/servers/openafs/1.8/module.nix @@ -23,8 +23,9 @@ let in stdenv.mkDerivation { - name = "openafs-${version}-${kernel.modDirVersion}"; - inherit version src; + pname = "openafs"; + version = "${version}-${kernel.modDirVersion}"; + inherit src; nativeBuildInputs = [ autoconf automake flex libtool_2 perl which bison ] ++ kernel.moduleBuildDependencies; diff --git a/pkgs/servers/openafs/1.9/module.nix b/pkgs/servers/openafs/1.9/module.nix index 83fe7ac98a7c..9799454223b2 100644 --- a/pkgs/servers/openafs/1.9/module.nix +++ b/pkgs/servers/openafs/1.9/module.nix @@ -10,8 +10,9 @@ let kernelBuildDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; in stdenv.mkDerivation { - name = "openafs-${version}-${kernel.modDirVersion}"; - inherit version src; + pname = "openafs"; + version = "${version}-${kernel.modDirVersion}"; + inherit src; nativeBuildInputs = [ autoconf automake flex libtool_2 perl which bison ] ++ kernel.moduleBuildDependencies; diff --git a/pkgs/shells/zsh/zsh-better-npm-completion/default.nix b/pkgs/shells/zsh/zsh-better-npm-completion/default.nix index 983a772d6d57..372d49eaeb7e 100644 --- a/pkgs/shells/zsh/zsh-better-npm-completion/default.nix +++ b/pkgs/shells/zsh/zsh-better-npm-completion/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - name = "zsh-better-npm-completion"; + pname = "zsh-better-npm-completion"; version = "unstable-2019-11-19"; src = fetchFromGitHub { diff --git a/pkgs/shells/zsh/zsh-deer/default.nix b/pkgs/shells/zsh/zsh-deer/default.nix index 895ca621cfed..ab544d7c3147 100644 --- a/pkgs/shells/zsh/zsh-deer/default.nix +++ b/pkgs/shells/zsh/zsh-deer/default.nix @@ -1,10 +1,8 @@ { lib, stdenv, fetchFromGitHub, perl }: -let +stdenv.mkDerivation rec { + pname = "deer"; version = "1.4"; - name = "deer-${version}"; -in stdenv.mkDerivation { - inherit name; src = fetchFromGitHub { owner = "Vifon";