Merge pull request #148702 from Stunkymonkey/treewide-pname-version-3

treewide: use pname&version instead of name
This commit is contained in:
Jörg Thalheim 2021-12-05 17:27:34 +00:00 committed by GitHub
commit 3f47d85f94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 49 additions and 62 deletions

View file

@ -27,11 +27,11 @@ let
};
in stdenv.mkDerivation rec {
name = "kibana-${optionalString (!enableUnfree) "oss-"}${version}";
pname = "kibana${optionalString (!enableUnfree) "-oss"}";
version = elk6Version;
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
url = "https://artifacts.elastic.co/downloads/kibana/${pname}-${version}-${plat}-${arch}.tar.gz";
sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
};

View file

@ -1,14 +1,12 @@
{ lib, stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
, libxml2, libkrb5, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto }:
let
stdenv.mkDerivation rec {
version = "5.1.6";
name = "autofs-${version}";
in stdenv.mkDerivation {
inherit name;
pname = "autofs";
src = fetchurl {
url = "mirror://kernel/linux/daemons/autofs/v5/${name}.tar.xz";
url = "mirror://kernel/linux/daemons/autofs/v5/autofs-${version}.tar.xz";
sha256 = "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx";
};

View file

@ -1,11 +1,8 @@
{lib, stdenv, fetchurl, openssl, nettools, iproute2, sysctl}:
let baseName = "gogoclient";
version = "1.2";
in
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
pname = "gogoclient";
version = "1.2";
src = fetchurl {
#url = "http://gogo6.com/downloads/gogoc-1_2-RELEASE.tar.gz";
@ -21,9 +18,9 @@ stdenv.mkDerivation rec {
buildInputs = [openssl];
preFixup = ''
mkdir -p $out/share/${name}
mkdir -p $out/share/gogoclient-${version}
chmod 444 $out/bin/gogoc.conf
mv $out/bin/gogoc.conf $out/share/${name}/gogoc.conf.sample
mv $out/bin/gogoc.conf $out/share/gogoclient-${version}/gogoc.conf.sample
rm $out/bin/gogoc.conf.sample
substituteInPlace "$out/template/linux.sh" \

View file

@ -1,7 +1,8 @@
{ lib, mkDerivation, fetchpatch, qtbase, qmake, inkscape, imagemagick, wpa_supplicant }:
mkDerivation {
name = "wpa_gui-${wpa_supplicant.version}";
pname = "wpa_gui";
version = wpa_supplicant.version;
inherit (wpa_supplicant) src;

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, jre, git, gradle_6, perl, makeWrapper }:
let
name = "ma1sd-${version}";
pname = "ma1sd";
version = "2.4.0";
rev = version;
@ -14,8 +14,8 @@ let
deps = stdenv.mkDerivation {
name = "${name}-deps";
inherit src;
pname = "${pname}-deps";
inherit src version;
nativeBuildInputs = [ gradle_6 perl git ];
buildPhase = ''
@ -40,7 +40,7 @@ let
in
stdenv.mkDerivation {
inherit name src version;
inherit pname src version;
nativeBuildInputs = [ gradle_6 perl makeWrapper ];
buildInputs = [ jre ];

View file

@ -1,8 +1,7 @@
{ lib, stdenv, fetchurl, libX11 }:
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
baseName = "xgeometry-select";
pname = "xgeometry-select";
version = "0.1";
src = fetchurl {
@ -15,12 +14,12 @@ stdenv.mkDerivation rec {
buildInputs = [ libX11 ];
buildPhase = ''
gcc -Wall -lX11 ${src} -o ${baseName}
gcc -Wall -lX11 ${src} -o xgeometry-select
'';
installPhase = ''
mkdir -p $out/bin
mv -v ${baseName} $out/bin
mv -v xgeometry-select $out/bin
'';
meta = with lib; {

View file

@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
name = "alsaequal";
pname = "alsaequal";
version = "0.6";
src = fetchurl {

View file

@ -2,14 +2,13 @@
, fetchFromGitHub, glib, pkg-config }:
stdenv.mkDerivation rec {
date = "2016-12-12";
name = "bluez-tools-${date}";
rev = "97efd29";
version = "unstable-2016-12-12";
pname = "bluez-tools";
src = fetchFromGitHub {
inherit rev;
owner = "khvzak";
repo = "bluez-tools";
rev = "97efd293491ad7ec96a655665339908f2478b3d1";
sha256 = "08xp77sf5wnq5086halmyk3vla4bfls06q1zrqdcq36hw6d409i6";
};

View file

@ -1,11 +1,11 @@
{ fetchurl, lib, stdenv, libcdio, zlib, bzip2, readline, acl, attr, libiconv }:
stdenv.mkDerivation rec {
name = "xorriso-${version}";
pname = "xorriso";
version = "1.5.4.pl02";
src = fetchurl {
url = "mirror://gnu/xorriso/${name}.tar.gz";
url = "mirror://gnu/xorriso/xorriso-${version}.tar.gz";
sha256 = "sha256-Psc5PUqdy/X3QwnCikFfVSJ+xidwuVrpk6yNejsVKXI=";
};

View file

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl, openssl, libbsd }:
let version = "332.25";
package_name = "hfsprogs"; in
stdenv.mkDerivation {
name = "${package_name}-${version}";
stdenv.mkDerivation rec {
version = "332.25";
pname = "hfsprogs";
srcs = [
(fetchurl {
url = "http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/${package_name}_${version}-11.debian.tar.gz";
url = "http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/hfsprogs_${version}-11.debian.tar.gz";
sha256 = "62d9b8599c66ebffbc57ce5d776e20b41341130d9b27341d63bda08460ebde7c";
})
(fetchurl {
@ -29,13 +28,13 @@ stdenv.mkDerivation {
installPhase = ''
# Create required package directories
install -m 755 -d "$out/bin"
install -m 755 -d "$out/share/${package_name}"
install -m 755 -d "$out/share/hfsprogs"
install -m 755 -d "$out/share/man/man8/"
# Copy executables
install -m 755 "newfs_hfs.tproj/newfs_hfs" "$out/bin/mkfs.hfsplus"
install -m 755 "fsck_hfs.tproj/fsck_hfs" "$out/bin/fsck.hfsplus"
# Copy shared data
install -m 644 "newfs_hfs.tproj/hfsbootdata.img" "$out/share/${package_name}/hfsbootdata"
install -m 644 "newfs_hfs.tproj/hfsbootdata.img" "$out/share/hfsprogs/hfsbootdata"
# Copy man pages
install -m 644 "newfs_hfs.tproj/newfs_hfs.8" "$out/share/man/man8/mkfs.hfsplus.8"
install -m 644 "fsck_hfs.tproj/fsck_hfs.8" "$out/share/man/man8/fsck.hfsplus.8"

View file

@ -1,14 +1,11 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, systemd, util-linux, coreutils }:
let
v = "2.02.106";
in
stdenv.mkDerivation {
name = "lvm2-${v}";
pname = "lvm2";
version = "2.02.106";
src = fetchurl {
url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${v}.tgz";
url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${version}.tgz";
sha256 = "0nr833bl0q4zq52drjxmmpf7bs6kqxwa5kahwwxm9411khkxz0vc";
};

View file

@ -1,7 +1,7 @@
{lib, stdenv, fetchurl, fetchpatch, zlib, ncurses, fuse}:
stdenv.mkDerivation rec {
name = "wiimms-iso-tools";
pname = "wiimms-iso-tools";
version = "3.02a";
src = fetchurl {

View file

@ -13,7 +13,7 @@ let
sha256 = "10bdjn481jsh32vll7r756l392anz44h6207vjqwby3rplk31np1";
};
in clangStdenv.mkDerivation rec {
name = "fcitx-mozc-${version}";
pname = "fcitx-mozc";
version = "2.23.2815.102";
src = fetchFromGitHub {

View file

@ -5,23 +5,23 @@
with lib;
let
qemuName = "qemu-2.10.0";
cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
else throw "afl: no support for ${stdenv.hostPlatform.system}!";
in
stdenv.mkDerivation {
name = "afl-${qemuName}";
stdenv.mkDerivation rec {
pname = "afl-qemu";
version = "2.10.0";
srcs = [
(fetchurl {
url = "http://wiki.qemu.org/download/${qemuName}.tar.bz2";
url = "http://wiki.qemu.org/download/qemu-${version}.tar.bz2";
sha256 = "0j3dfxzrzdp1w21k21fjvmakzc6lcha1rsclaicwqvbf63hkk7vy";
})
afl.src
];
sourceRoot = qemuName;
sourceRoot = "qemu-${version}";
postUnpack = ''
cp ${afl.src.name}/types.h $sourceRoot/afl-types.h

View file

@ -11,7 +11,7 @@
with lib;
stdenv.mkDerivation rec {
name = "nmap${optionalString graphicalSupport "-graphical"}-${version}";
pname = "nmap${optionalString graphicalSupport "-graphical"}";
version = "7.92";
src = fetchurl {

View file

@ -2,7 +2,6 @@
let
version = "1.2.4";
srcs = {
richclient = fetchurl {
url = "https://jnlp.openecard.org/richclient-${version}-20171212-0958.jar";
@ -18,8 +17,8 @@ let
};
};
in stdenv.mkDerivation rec {
appName = "open-ecard";
name = "${appName}-${version}";
pname = "open-ecard";
inherit version;
src = srcs.richclient;
@ -28,12 +27,12 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
desktopItem = makeDesktopItem {
name = appName;
name = pname;
desktopName = "Open eCard App";
genericName = "eCard App";
comment = "Client side implementation of the eCard-API-Framework";
icon = "oec_logo_bg-transparent.svg";
exec = appName;
exec = pname;
categories = "Utility;Security;";
};
@ -47,7 +46,7 @@ in stdenv.mkDerivation rec {
cp ${srcs.logo} $out/share/pixmaps/oec_logo_bg-transparent.svg
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/${appName} \
makeWrapper ${jre}/bin/java $out/bin/${pname} \
--add-flags "-cp $out/share/java/cifs-${version}.jar" \
--add-flags "-jar $out/share/java/richclient-${version}.jar" \
--suffix LD_LIBRARY_PATH ':' ${lib.getLib pcsclite}/lib

View file

@ -2,14 +2,12 @@
, withGUI ? false, gtk2, pkg-config, sqlite # compile GUI
}:
let numVersion = "02.18"; # :(
in
stdenv.mkDerivation rec {
name = "lshw-${numVersion}b";
version = numVersion;
pname = "lshw";
version = "B.02.18";
src = fetchurl {
url = "https://ezix.org/software/files/lshw-B.${version}.tar.gz";
url = "https://ezix.org/software/files/lshw-${version}.tar.gz";
sha256 = "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf";
};