From 826c21549169faf268cba920dda90860e7618496 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 21 Feb 2022 22:17:57 +0100 Subject: [PATCH] treewide: rename name to pname&version --- .../libraries/libsmartcols/default.nix | 6 ++-- .../libraries/libsnark/default.nix | 10 +++--- pkgs/development/libraries/libui/default.nix | 21 ++++++------ .../development/libraries/pdf2xml/default.nix | 1 + .../libraries/physics/geant4/datasets.nix | 34 +++++++++---------- pkgs/development/libraries/prison/default.nix | 7 ++-- .../libraries/proj-datumgrid/default.nix | 2 +- .../libraries/qimageblitz/default.nix | 14 +++----- .../libraries/qt-4.x/4.8/default.nix | 23 +++++-------- .../science/math/clmagma/default.nix | 10 +++--- .../science/math/suitesparse/4.4.nix | 10 +++--- pkgs/development/libraries/soil/default.nix | 3 +- .../libraries/speech-tools/default.nix | 6 ++-- pkgs/development/libraries/tclx/default.nix | 13 +++---- pkgs/development/libraries/uri/default.nix | 2 +- pkgs/development/libraries/vte/2.90.nix | 9 ++--- 16 files changed, 77 insertions(+), 94 deletions(-) diff --git a/pkgs/development/libraries/libsmartcols/default.nix b/pkgs/development/libraries/libsmartcols/default.nix index bcd1573e2038..077055cbb9a4 100644 --- a/pkgs/development/libraries/libsmartcols/default.nix +++ b/pkgs/development/libraries/libsmartcols/default.nix @@ -1,15 +1,15 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, python3, gtk-doc}: stdenv.mkDerivation rec { - name = "libsmartcols"; - version = "v2.36.1"; + pname = "libsmartcols"; + version = "2.36.1"; nativeBuildInputs = [ autoreconfHook pkg-config python3 gtk-doc ]; src = fetchFromGitHub { owner = "karelzak"; repo = "util-linux"; - rev = version; + rev = "v${version}"; sha256 = "0z7nv054pqhlihqiw0vk3h40j0cxk1yxf8zzh0ddmvk6834cnyxs"; }; diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix index c3e6d0e049e4..37352bf5e3c4 100644 --- a/pkgs/development/libraries/libsnark/default.nix +++ b/pkgs/development/libraries/libsnark/default.nix @@ -1,10 +1,8 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }: -let - rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07"; -in stdenv.mkDerivation rec { - name = "libsnark-pre${version}"; - version = lib.substring 0 8 rev; +stdenv.mkDerivation rec { + pname = "libsnark"; + version = "unstable-2018-01-15"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ openssl boost gmp ] ++ lib.optional stdenv.hostPlatform.isLinux procps; @@ -12,7 +10,7 @@ in stdenv.mkDerivation rec { cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" "-DWITH_SUPERCOP=OFF" ]; src = fetchFromGitHub { - inherit rev; + rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07"; owner = "scipr-lab"; repo = "libsnark"; sha256 = "13f02qp2fmfhvxlp4xi69m0l8r5nq913l2f0zwdk7hl46lprfdca"; diff --git a/pkgs/development/libraries/libui/default.nix b/pkgs/development/libraries/libui/default.nix index 7002f75cc45e..14fb004187d8 100644 --- a/pkgs/development/libraries/libui/default.nix +++ b/pkgs/development/libraries/libui/default.nix @@ -1,13 +1,12 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtk3, Cocoa }: let - shortName = "libui"; - version = "4.1a"; backend = if stdenv.isDarwin then "darwin" else "unix"; in -stdenv.mkDerivation { - name = "${shortName}-${version}"; +stdenv.mkDerivation rec { + pname = "libui"; + version = "4.1a"; src = fetchFromGitHub { owner = "andlabs"; repo = "libui"; @@ -27,22 +26,22 @@ stdenv.mkDerivation { mkdir -p $out/{include,lib} mkdir -p $out/lib/pkgconfig '' + lib.optionalString stdenv.isLinux '' - mv ./out/${shortName}.so.0 $out/lib/ - ln -s $out/lib/${shortName}.so.0 $out/lib/${shortName}.so + mv ./out/libui.so.0 $out/lib/ + ln -s $out/lib/libui.so.0 $out/lib/libui.so '' + lib.optionalString stdenv.isDarwin '' - mv ./out/${shortName}.A.dylib $out/lib/ - ln -s $out/lib/${shortName}.A.dylib $out/lib/${shortName}.dylib + mv ./out/libui.A.dylib $out/lib/ + ln -s $out/lib/lubui.A.dylib $out/lib/libui.dylib '' + '' cp $src/ui.h $out/include cp $src/ui_${backend}.h $out/include - cp ${./libui.pc} $out/lib/pkgconfig/${shortName}.pc - substituteInPlace $out/lib/pkgconfig/${shortName}.pc \ + cp ${./libui.pc} $out/lib/pkgconfig/libui.pc + substituteInPlace $out/lib/pkgconfig/libui.pc \ --subst-var-by out $out \ --subst-var-by version "${version}" ''; postInstall = lib.optionalString stdenv.isDarwin '' - install_name_tool -id $out/lib/${shortName}.A.dylib $out/lib/${shortName}.A.dylib + install_name_tool -id $out/lib/libui.A.dylib $out/lib/libui.A.dylib ''; meta = with lib; { diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix index 2dfd35466858..c45a8e03fd16 100644 --- a/pkgs/development/libraries/pdf2xml/default.nix +++ b/pkgs/development/libraries/pdf2xml/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation { meta = with lib; { description = "PDF to XML converter"; + homepage = "https://sourceforge.net/projects/pdf2xml/"; platforms = platforms.unix; license = licenses.gpl2; }; diff --git a/pkgs/development/libraries/physics/geant4/datasets.nix b/pkgs/development/libraries/physics/geant4/datasets.nix index e9b7f54e2a48..80de299793a4 100644 --- a/pkgs/development/libraries/physics/geant4/datasets.nix +++ b/pkgs/development/libraries/physics/geant4/datasets.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchurl, geant_version }: let - mkDataset = { name, version, sha256, envvar }: + mkDataset = { pname, version, sha256, envvar }: stdenv.mkDerivation { - inherit name version; + inherit pname version; inherit geant_version; src = fetchurl { - url = "https://cern.ch/geant4-data/datasets/${name}.${version}.tar.gz"; + url = "https://cern.ch/geant4-data/datasets/${pname}.${version}.tar.gz"; inherit sha256; }; @@ -15,7 +15,7 @@ let dontBuild = true; dontConfigure = true; - datadir = "${placeholder "out"}/share/Geant4-${geant_version}/data/${name}${version}"; + datadir = "${placeholder "out"}/share/Geant4-${geant_version}/data/${pname}${version}"; installPhase = '' mkdir -p $datadir mv ./* $datadir @@ -32,86 +32,86 @@ let }; }; in - builtins.listToAttrs (map (a: { inherit (a) name; value = mkDataset a; }) [ + builtins.listToAttrs (map (a: { inherit (a) pname; value = mkDataset a; }) [ { - name = "G4NDL"; + pname = "G4NDL"; version = "4.6"; sha256 = "sha256-nSh88q4PuIeirc6AHudPub4hsNFm2rSby+6UCKUUVAg="; envvar = "NEUTRONHP"; } { - name = "G4EMLOW"; + pname = "G4EMLOW"; version = "8.0"; sha256 = "sha256-2Rmo5YOGiCV7kkimE5EOsqdjMFngMMi1DAosKtn9Kzs="; envvar = "LE"; } { - name = "G4PhotonEvaporation"; + pname = "G4PhotonEvaporation"; version = "5.7"; sha256 = "sha256-dh5C5W/93j2YOfn52BAmB8a0wDKRUe5Rggb07p535+U="; envvar = "LEVELGAMMA"; } { - name = "G4RadioactiveDecay"; + pname = "G4RadioactiveDecay"; version = "5.6"; sha256 = "sha256-OIYHfJyOWph4PmcY4cMlZ4me6y27M+QC1Edrwv5PDfE="; envvar = "RADIOACTIVE"; } { - name = "G4SAIDDATA"; + pname = "G4SAIDDATA"; version = "2.0"; sha256 = "sha256-HSao55uqceRNV1m59Vpn6Lft4xdRMWqekDfYAJDHLpE="; envvar = "SAIDXS"; } { - name = "G4PARTICLEXS"; + pname = "G4PARTICLEXS"; version = "4.0"; sha256 = "sha256-k4EDlwPD8rD9NqtJmTYqLItP+QgMMi+QtOMZKBEzypU="; envvar = "PARTICLEXS"; } { - name = "G4ABLA"; + pname = "G4ABLA"; version = "3.1"; sha256 = "sha256-dpiwUrWL8bmIa+rNvWr2B63B4Jn8cwq2shz38JDAJ+0="; envvar = "ABLA"; } { - name = "G4INCL"; + pname = "G4INCL"; version = "1.0"; sha256 = "sha256-cWFhghrp89BWX788LPNPTgLj5RnrQZqCI27vIsLENn0="; envvar = "INCL"; } { - name = "G4PII"; + pname = "G4PII"; version = "1.3"; sha256 = "sha256-YiWtkCZ19DgcmMa6JfxaBs6HVJqpeWNNPQNJHWYW6SY="; envvar = "PII"; } { - name = "G4ENSDFSTATE"; + pname = "G4ENSDFSTATE"; version = "2.3"; sha256 = "sha256-lETF4IIHkavTzKrOEFsOR3kPrc4obhEUmDTnnEqOkgM="; envvar = "ENSDFSTATE"; } { - name = "G4RealSurface"; + pname = "G4RealSurface"; version = "2.2"; sha256 = "sha256-mVTe4AEvUzEmf3g2kOkS5y21v1Lqm6vs0S6iIoIXaCA="; envvar = "REALSURFACE"; } { - name = "G4TENDL"; + pname = "G4TENDL"; version = "1.4"; sha256 = "sha256-S3J0AgzItO1Wm4ku8YwuCI7c22tm850lWFzO4l2XIeA="; envvar = "PARTICLEHP"; diff --git a/pkgs/development/libraries/prison/default.nix b/pkgs/development/libraries/prison/default.nix index 4275622c24f4..71f8596c646b 100644 --- a/pkgs/development/libraries/prison/default.nix +++ b/pkgs/development/libraries/prison/default.nix @@ -1,12 +1,11 @@ { lib, stdenv, fetchurl, cmake, qrencode, qt4, libdmtx }: -let v = "1.0"; in - stdenv.mkDerivation rec { - name = "prison-${v}"; + pname = "prison"; + version = "1.0"; src = fetchurl { - url = "mirror://kde/stable/prison/${v}/src/${name}.tar.gz"; + url = "mirror://kde/stable/prison/${version}/src/prison-${version}.tar.gz"; sha256 = "08hkzzda36jpdywjqlyzcvli7cx17h4l9yffzsdnhdd788n28krr"; }; diff --git a/pkgs/development/libraries/proj-datumgrid/default.nix b/pkgs/development/libraries/proj-datumgrid/default.nix index 93e415f62699..8251a17a83c6 100644 --- a/pkgs/development/libraries/proj-datumgrid/default.nix +++ b/pkgs/development/libraries/proj-datumgrid/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - name = "proj-datumgrid"; + pname = "proj-datumgrid"; version = "world-1.0"; src = fetchFromGitHub { diff --git a/pkgs/development/libraries/qimageblitz/default.nix b/pkgs/development/libraries/qimageblitz/default.nix index 709a3fb1533d..e838eb07201f 100644 --- a/pkgs/development/libraries/qimageblitz/default.nix +++ b/pkgs/development/libraries/qimageblitz/default.nix @@ -1,15 +1,11 @@ {lib, stdenv, fetchurl, cmake, qt4}: -let - pn = "qimageblitz"; - v = "0.0.4"; -in - -stdenv.mkDerivation { - name = "${pn}-${v}"; +stdenv.mkDerivation rec { + pname = "qimageblitz"; + version = "0.0.4"; src = fetchurl { - url = "mirror://sourceforge/${pn}/${pn}-${v}.tar.bz2"; + url = "mirror://sourceforge/qimageblitz/qimageblitz-${version}.tar.bz2"; sha256 = "0pnaf3qi7rgkxzs2mssmslb3f9ya4cyx09wzwlis3ppyvf72j0p9"; }; @@ -21,7 +17,7 @@ stdenv.mkDerivation { meta = { description = "Graphical effect and filter library for KDE4"; license = lib.licenses.bsd2; - homepage = "http://${pn}.sourceforge.net"; + homepage = "http://qimageblitz.sourceforge.net"; platforms = lib.platforms.linux; }; } diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 96d2abe5a6ea..e81f3c186d63 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -15,22 +15,17 @@ , libobjc, ApplicationServices, OpenGL, Cocoa, AGL, libcxx }: -let - v_maj = "4.8"; - v_min = "7"; - vers = "${v_maj}.${v_min}"; -in - # TODO: # * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid # false build-time dependencies stdenv.mkDerivation rec { - name = "qt-${vers}"; + pname = "qt"; + version = "4.8.7"; src = fetchurl { url = "http://download.qt-project.org/official_releases/qt/" - + "${v_maj}/${vers}/qt-everywhere-opensource-src-${vers}.tar.gz"; + + "${lib.versions.majorMinor version}/${version}/qt-everywhere-opensource-src-${version}.tar.gz"; sha256 = "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"; }; @@ -40,8 +35,6 @@ stdenv.mkDerivation rec { setOutputFlags = false; - # The version property must be kept because it will be included into the QtSDK package name - version = vers; prePatch = '' substituteInPlace configure --replace /bin/pwd pwd @@ -131,13 +124,13 @@ stdenv.mkDerivation rec { preConfigure = '' export LD_LIBRARY_PATH="`pwd`/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" configureFlags+=" - -docdir $out/share/doc/${name} + -docdir $out/share/doc/qt-${version} -plugindir $out/lib/qt4/plugins -importdir $out/lib/qt4/imports - -examplesdir $TMPDIR/share/doc/${name}/examples - -demosdir $TMPDIR/share/doc/${name}/demos - -datadir $out/share/${name} - -translationdir $out/share/${name}/translations + -examplesdir $TMPDIR/share/doc/qt-${version}/examples + -demosdir $TMPDIR/share/doc/qt-${version}/demos + -datadir $out/share/qt-${version} + -translationdir $out/share/qt-${version}/translations --jobs=$NIX_BUILD_CORES " unset LD # Makefile uses gcc for linking; setting LD interferes diff --git a/pkgs/development/libraries/science/math/clmagma/default.nix b/pkgs/development/libraries/science/math/clmagma/default.nix index 3905e70d3401..fe9fc540902d 100644 --- a/pkgs/development/libraries/science/math/clmagma/default.nix +++ b/pkgs/development/libraries/science/math/clmagma/default.nix @@ -3,7 +3,6 @@ with lib; let - version = "1.3.0"; incfile = builtins.toFile "make.inc.custom" '' CC = g++ FORT = gfortran @@ -32,10 +31,11 @@ let INC = -I$(clBLAS)/include #-I$(AMDAPP)/include ''; -in stdenv.mkDerivation { - name = "clmagma-${version}"; +in stdenv.mkDerivation rec { + pname = "clmagma"; + version = "1.3.0"; src = fetchurl { - url = "http://icl.cs.utk.edu/projectsfiles/magma/cl/clmagma-${version}.tar.gz"; + url = "https://icl.cs.utk.edu/projectsfiles/magma/cl/clmagma-${version}.tar.gz"; sha256 = "1n27ny0xhwirw2ydn46pfcwy53gzia9zbam4irx44fd4d7f9ydv7"; name = "clmagma-${version}.tar.gz"; }; @@ -68,7 +68,7 @@ in stdenv.mkDerivation { meta = with lib; { description = "Matrix Algebra on GPU and Multicore Architectures, OpenCL port"; license = licenses.bsd3; - homepage = "http://icl.cs.utk.edu/magma/index.html"; + homepage = "https://icl.cs.utk.edu/magma/index.html"; platforms = platforms.linux; maintainers = with maintainers; [ volhovm ]; }; diff --git a/pkgs/development/libraries/science/math/suitesparse/4.4.nix b/pkgs/development/libraries/science/math/suitesparse/4.4.nix index 1ebac6ac445d..e734ed8ff35a 100644 --- a/pkgs/development/libraries/science/math/suitesparse/4.4.nix +++ b/pkgs/development/libraries/science/math/suitesparse/4.4.nix @@ -3,14 +3,12 @@ }: let - version = "4.4.4"; - name = "suitesparse-${version}"; - int_t = if blas.isILP64 then "int64_t" else "int32_t"; SHLIB_EXT = stdenv.hostPlatform.extensions.sharedLibrary; in -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + version = "4.4.4"; + pname = "suitesparse"; src = fetchurl { url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${version}.tar.gz"; @@ -71,7 +69,7 @@ stdenv.mkDerivation { done # Install documentation - outdoc=$out/share/doc/${name} + outdoc=$out/share/doc/suitesparse-${version} mkdir -p $outdoc cp -r AMD/Doc $outdoc/amd cp -r BTF/Doc $outdoc/bft diff --git a/pkgs/development/libraries/soil/default.nix b/pkgs/development/libraries/soil/default.nix index dcec1c897b3b..39a64c84ddcd 100644 --- a/pkgs/development/libraries/soil/default.nix +++ b/pkgs/development/libraries/soil/default.nix @@ -6,7 +6,8 @@ }: stdenv.mkDerivation { - name = "soil"; + pname = "soil"; + version = "unstable-2020-01-04"; src = fetchzip { url = "https://web.archive.org/web/20200104042737id_/http://www.lonesock.net/files/soil.zip"; diff --git a/pkgs/development/libraries/speech-tools/default.nix b/pkgs/development/libraries/speech-tools/default.nix index 8706b8789227..c69345193c77 100644 --- a/pkgs/development/libraries/speech-tools/default.nix +++ b/pkgs/development/libraries/speech-tools/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, alsa-lib, ncurses }: stdenv.mkDerivation rec { - name = "speech_tools-${version}.0"; - version = "2.5"; + pname = "speech_tools"; + version = "2.5.0"; src = fetchurl { - url = "http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz"; + url = "http://www.festvox.org/packed/festival/${lib.versions.majorMinor version}/speech_tools-${version}-release.tar.gz"; sha256 = "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4"; }; diff --git a/pkgs/development/libraries/tclx/default.nix b/pkgs/development/libraries/tclx/default.nix index a8cf2a44fab6..3c814e17207c 100644 --- a/pkgs/development/libraries/tclx/default.nix +++ b/pkgs/development/libraries/tclx/default.nix @@ -1,18 +1,19 @@ { lib, fetchurl, tcl }: tcl.mkTclDerivation rec { - name = "tclx-${version}.${patch}"; - version = "8.4"; - patch = "1"; + pname = "tclx"; + version = "8.4.1"; src = fetchurl { - url = "mirror://sourceforge/tclx/tclx${version}.${patch}.tar.bz2"; + url = "mirror://sourceforge/tclx/tclx${version}.tar.bz2"; sha256 = "1v2qwzzidz0is58fd1p7wfdbscxm3ip2wlbqkj5jdhf6drh1zd59"; }; # required in order for tclx to properly detect tclx.tcl at runtime - postInstall = '' - ln -s $prefix/lib/tclx${version} $prefix/lib/tclx${version}/tclx${version} + postInstall = let + majorMinorVersion = lib.versions.majorMinor version; + in '' + ln -s $prefix/lib/tclx${majorMinorVersion} $prefix/lib/tclx${majorMinorVersion}/tclx${majorMinorVersion} ''; meta = { diff --git a/pkgs/development/libraries/uri/default.nix b/pkgs/development/libraries/uri/default.nix index 48a80aacdf59..980d073f1281 100644 --- a/pkgs/development/libraries/uri/default.nix +++ b/pkgs/development/libraries/uri/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, cmake, doxygen }: stdenv.mkDerivation rec { - name = "uri-${version}"; + pname = "uri"; version = "1.1.0"; src = fetchFromGitHub { diff --git a/pkgs/development/libraries/vte/2.90.nix b/pkgs/development/libraries/vte/2.90.nix index 55ef86c88a0e..dfb76069c3b2 100644 --- a/pkgs/development/libraries/vte/2.90.nix +++ b/pkgs/development/libraries/vte/2.90.nix @@ -1,14 +1,11 @@ { lib, stdenv, fetchurl, intltool, pkg-config, glib, gtk3, ncurses, gobject-introspection }: stdenv.mkDerivation rec { - versionMajor = "0.36"; - versionMinor = "3"; - moduleName = "vte"; - - name = "${moduleName}-${versionMajor}.${versionMinor}"; + pname = "vte"; + version = "0.36.3"; src = fetchurl { - url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; + url = "mirror://gnome/sources/vte/${lib.versions.majorMinor version}/vte-${version}.tar.xz"; sha256 = "54e5b07be3c0f7b158302f54ee79d4de1cb002f4259b6642b79b1e0e314a959c"; };