diff --git a/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix b/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix index 7ea5fa753c81..fd55bae6fd61 100644 --- a/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix +++ b/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }: stdenv.mkDerivation rec { - name = "faustCompressors-v${version}"; + pname = "faustCompressors"; version = "1.2"; src = fetchFromGitHub { diff --git a/pkgs/applications/graphics/xournal/default.nix b/pkgs/applications/graphics/xournal/default.nix index f83127238756..47a47ae4f25d 100644 --- a/pkgs/applications/graphics/xournal/default.nix +++ b/pkgs/applications/graphics/xournal/default.nix @@ -10,9 +10,9 @@ in stdenv.mkDerivation rec { version = "0.4.8.2016"; - name = "xournal-" + version; + pname = "xournal"; src = fetchurl { - url = "mirror://sourceforge/xournal/${name}.tar.gz"; + url = "mirror://sourceforge/xournal/xournal-${version}.tar.gz"; sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"; }; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { + lib.optionalString (!isGdkQuartzBackend) " -lX11"; desktopItem = makeDesktopItem { - name = name; + name = "xournal-${version}"; exec = "xournal"; icon = "xournal"; desktopName = "Xournal"; diff --git a/pkgs/applications/misc/gosmore/default.nix b/pkgs/applications/misc/gosmore/default.nix index 854fec8642a8..bd87e7b4aeb6 100644 --- a/pkgs/applications/misc/gosmore/default.nix +++ b/pkgs/applications/misc/gosmore/default.nix @@ -1,10 +1,8 @@ { lib, stdenv, fetchsvn, libxml2, gtk2, curl, pkg-config } : -let +stdenv.mkDerivation rec { + pname = "gosmore"; version = "31801"; -in -stdenv.mkDerivation { - name = "gosmore-r${version}"; # the gosmore svn repository does not lock revision numbers of its externals # so we explicitly disable them to avoid breaking the hash # especially as the externals appear to be unused diff --git a/pkgs/applications/misc/lighthouse/default.nix b/pkgs/applications/misc/lighthouse/default.nix index e9aa79dcdd83..01ffb7a9ffe8 100644 --- a/pkgs/applications/misc/lighthouse/default.nix +++ b/pkgs/applications/misc/lighthouse/default.nix @@ -3,8 +3,8 @@ }: stdenv.mkDerivation rec { - name = "lighthouse-${date}"; - date = "2016-07-20"; + pname = "lighthouse"; + version = "unstable-2016-07-20"; src = fetchFromGitHub { owner = "emgram769"; diff --git a/pkgs/applications/misc/mucommander/default.nix b/pkgs/applications/misc/mucommander/default.nix index 648b4951504f..681e2d3eb4e6 100644 --- a/pkgs/applications/misc/mucommander/default.nix +++ b/pkgs/applications/misc/mucommander/default.nix @@ -2,7 +2,6 @@ let version = "0.9.3-3"; - name = "mucommander-${version}"; src = fetchFromGitHub { owner = "mucommander"; @@ -34,8 +33,8 @@ let # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { - name = "${name}-deps"; - inherit src postPatch; + pname = "mucommander-deps"; + inherit version src postPatch; nativeBuildInputs = [ gradle_6 perl ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) @@ -53,7 +52,8 @@ let }; in stdenv.mkDerivation { - inherit name src postPatch; + pname = "mucommander"; + inherit version src postPatch; nativeBuildInputs = [ gradle_6 perl makeWrapper ]; buildPhase = '' diff --git a/pkgs/applications/misc/pdfdiff/default.nix b/pkgs/applications/misc/pdfdiff/default.nix index 20a953384971..e21b06bf25ca 100644 --- a/pkgs/applications/misc/pdfdiff/default.nix +++ b/pkgs/applications/misc/pdfdiff/default.nix @@ -1,9 +1,7 @@ { lib, python2Packages, fetchurl, xpdf }: -let - py = python2Packages; -in -py.buildPythonApplication rec { - name = "pdfdiff-${version}"; + +python2Packages.buildPythonApplication rec { + pname = "pdfdiff"; version = "0.92"; src = fetchurl { diff --git a/pkgs/applications/misc/pdfpc/default.nix b/pkgs/applications/misc/pdfpc/default.nix index ec78c43dbe04..9bf5907a23be 100644 --- a/pkgs/applications/misc/pdfpc/default.nix +++ b/pkgs/applications/misc/pdfpc/default.nix @@ -3,13 +3,12 @@ , webkitgtk, discount, json-glib }: stdenv.mkDerivation rec { - name = "${product}-${version}"; - product = "pdfpc"; + pname = "pdfpc"; version = "4.5.0"; src = fetchFromGitHub { - repo = product; - owner = product; + repo = "pdfpc"; + owner = "pdfpc"; rev = "v${version}"; sha256 = "0bmy51w6ypz927hxwp5g7wapqvzqmsi3w32rch6i3f94kg1152ck"; }; diff --git a/pkgs/applications/misc/qmetro/default.nix b/pkgs/applications/misc/qmetro/default.nix index 70c41ff3142f..2678f744f8ed 100644 --- a/pkgs/applications/misc/qmetro/default.nix +++ b/pkgs/applications/misc/qmetro/default.nix @@ -1,12 +1,11 @@ { lib, stdenv, fetchurl, qmake4Hook, unzip, qt4 }: stdenv.mkDerivation rec { - name = "${project}-${version}"; - project = "qmetro"; + pname = "qmetro"; version = "0.7.1"; src = fetchurl { - url = "mirror://sourceforge/${project}/${name}.zip"; + url = "mirror://sourceforge/qmetro/qmetro-${version}.zip"; sha256 = "1zdj87lzcr43gr2h05g17z31pd22n5kxdwbvx7rx656rmhv0sjq5"; }; diff --git a/pkgs/applications/misc/sleepyhead/default.nix b/pkgs/applications/misc/sleepyhead/default.nix index 94c47c23afef..63a45758d932 100644 --- a/pkgs/applications/misc/sleepyhead/default.nix +++ b/pkgs/applications/misc/sleepyhead/default.nix @@ -1,10 +1,8 @@ { lib, stdenv, mkDerivation, fetchgit, zlib, libGLU, libX11, qtbase, qtwebkit, qtserialport, wrapQtAppsHook }: -let - name = "sleepyhead-${version}"; +mkDerivation { + pname = "sleepyhead"; version = "1.0.0-beta-git"; -in mkDerivation { - inherit name; src = fetchgit { url = "https://gitlab.com/sleepyhead/sleepyhead-code.git"; diff --git a/pkgs/applications/misc/slmenu/default.nix b/pkgs/applications/misc/slmenu/default.nix index 16145a915feb..80aedd574187 100644 --- a/pkgs/applications/misc/slmenu/default.nix +++ b/pkgs/applications/misc/slmenu/default.nix @@ -1,30 +1,19 @@ {lib, stdenv, fetchhg}: -let - s = - rec { - baseName = "slmenu"; - version = "hg-${date}"; - date = "2012-02-01"; - name = "${baseName}-${version}"; + +stdenv.mkDerivation { + pname = "slmenu"; + version = "hg-2012-02-01"; + + src = fetchhg { url = "https://bitbucket.org/rafaelgg/slmenu/"; rev = "7e74fa5db73e8b018da48d50dbbaf11cb5c62d13"; sha256 = "0zb7mm8344d3xmvrl62psazcabfk75pp083jqkmywdsrikgjagv6"; }; - buildInputs = [ - ]; -in -stdenv.mkDerivation { - inherit (s) name version; - inherit buildInputs; - src = fetchhg { - inherit (s) url sha256; - }; makeFlags = [ "PREFIX=$(out)" ]; - meta = { - inherit (s) version; + meta = with lib; { description = "A console dmenu-like tool"; - license = lib.licenses.mit; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/misc/tuhi/default.nix b/pkgs/applications/misc/tuhi/default.nix index 4bd0c914d3a1..bf939cfa1758 100644 --- a/pkgs/applications/misc/tuhi/default.nix +++ b/pkgs/applications/misc/tuhi/default.nix @@ -13,15 +13,15 @@ }: python3Packages.buildPythonApplication rec { - name = "tuhi"; + pname = "tuhi"; version = "0.5"; format = "other"; src = fetchFromGitHub { owner = "tuhiproject"; - repo = name; - rev = "${version}"; + repo = "tuhi"; + rev = version; sha256 = "17kggm9c423vj7irxx248fjc8sxvkp9w1mgawlx1snrii817p3db"; }; diff --git a/pkgs/applications/misc/urlview/default.nix b/pkgs/applications/misc/urlview/default.nix index 0374fb91844d..2eca4cfccb31 100644 --- a/pkgs/applications/misc/urlview/default.nix +++ b/pkgs/applications/misc/urlview/default.nix @@ -1,15 +1,15 @@ { lib, stdenv, fetchurl, ncurses, autoreconfHook }: stdenv.mkDerivation rec { - version = "0.9"; + pname = "urlview"; + _version = "0.9"; patchLevel = "19"; - - name = "urlview-${version}-${patchLevel}"; + version = "${_version}-${patchLevel}"; urlBase = "mirror://debian/pool/main/u/urlview/"; src = fetchurl { - url = urlBase + "urlview_${version}.orig.tar.gz"; + url = urlBase + "urlview_${_version}.orig.tar.gz"; sha256 = "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42"; }; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { ''; debianPatches = fetchurl { - url = urlBase + "urlview_${version}-${patchLevel}.diff.gz"; + url = urlBase + "urlview_${_version}-${patchLevel}.diff.gz"; sha256 = "056883c17756f849fb9235596d274fbc5bc0d944fcc072bdbb13d1e828301585"; }; diff --git a/pkgs/applications/misc/xmr-stak/default.nix b/pkgs/applications/misc/xmr-stak/default.nix index cb4233be8ec3..91c8c69fe930 100644 --- a/pkgs/applications/misc/xmr-stak/default.nix +++ b/pkgs/applications/misc/xmr-stak/default.nix @@ -11,7 +11,7 @@ let in stdenv'.mkDerivation rec { - name = "xmr-stak-${version}"; + pname = "xmr-stak"; version = "2.10.8"; src = fetchFromGitHub { diff --git a/pkgs/applications/misc/zscroll/default.nix b/pkgs/applications/misc/zscroll/default.nix index 3acac8b3c68d..d3424938dd9b 100644 --- a/pkgs/applications/misc/zscroll/default.nix +++ b/pkgs/applications/misc/zscroll/default.nix @@ -1,9 +1,9 @@ { lib, python3, python3Packages, fetchFromGitHub }: -let version = "1.0"; in +python3Packages.buildPythonApplication rec { + pname = "zscroll"; + version = "1.0"; -python3Packages.buildPythonApplication { - name = "zscroll-${version}"; # don't prefix with python version namePrefix = ""; diff --git a/pkgs/applications/networking/p2p/frostwire/default.nix b/pkgs/applications/networking/p2p/frostwire/default.nix index e4c1c8f5b7ba..cd6ae563aa0b 100644 --- a/pkgs/applications/networking/p2p/frostwire/default.nix +++ b/pkgs/applications/networking/p2p/frostwire/default.nix @@ -2,12 +2,11 @@ let version = "6.6.7-build-529"; - name = "frostwire-desktop-${version}"; src = fetchFromGitHub { owner = "frostwire"; repo = "frostwire"; - rev = name; + rev = "frostwire-desktop-${version}"; sha256 = "03wdj2kr8akzx8m1scvg98132zbaxh81qjdsxn2645b3gahjwz0m"; }; @@ -23,8 +22,8 @@ let # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { - name = "${name}-deps"; - inherit src; + pname = "frostwire-desktop-deps"; + inherit version src; buildInputs = [ gradle_6 perl ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) @@ -40,11 +39,12 @@ let ''; outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = "11zd98g0d0fdgls4lsskkagwfxyh26spfd6c6g9cahl89czvlg3c"; + outputHash = "sha256-r6YSrbSJbM3063JrX4tCVKFrJxTaLN4Trc+33jzpwcE="; }; in stdenv.mkDerivation { - inherit name src; + pname = "frostwire-desktop"; + inherit version src; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ gradle_6 ]; diff --git a/pkgs/applications/networking/remote/vmware-horizon-client/default.nix b/pkgs/applications/networking/remote/vmware-horizon-client/default.nix index be0832a075f8..f114f8a3091b 100644 --- a/pkgs/applications/networking/remote/vmware-horizon-client/default.nix +++ b/pkgs/applications/networking/remote/vmware-horizon-client/default.nix @@ -115,7 +115,8 @@ let in stdenv.mkDerivation { - name = "vmware-horizon-client"; + pname = "vmware-horizon-client"; + inherit version; dontUnpack = true; diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index 767a4202ae86..d5c4dcb65011 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -4,7 +4,6 @@ let _version = "2.10.1"; _build = "482"; version = "${_version}-${_build}"; - name = "jameica-${version}"; swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux" else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" @@ -22,7 +21,8 @@ let }; in stdenv.mkDerivation rec { - inherit name version; + pname = "jameica"; + inherit version; nativeBuildInputs = [ ant jdk makeWrapper ]; buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib xorg.libXtst ] @@ -42,12 +42,12 @@ stdenv.mkDerivation rec { ''; installPhase = '' - mkdir -p $out/libexec $out/lib $out/bin $out/share/{applications,${name},java}/ + mkdir -p $out/libexec $out/lib $out/bin $out/share/{applications,jameica-${version},java}/ # copy libraries except SWT - cp $(find lib -type f -iname '*.jar' | grep -ve 'swt/.*/swt.jar') $out/share/${name}/ + cp $(find lib -type f -iname '*.jar' | grep -ve 'swt/.*/swt.jar') $out/share/jameica-${version}/ # copy platform-specific SWT - cp lib/swt/${swtSystem}/swt.jar $out/share/${name}/ + cp lib/swt/${swtSystem}/swt.jar $out/share/jameica-${version}/ install -Dm644 releases/${_version}-*/jameica/jameica.jar $out/share/java/ install -Dm644 plugin.xml $out/share/java/ @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { cp ${desktopItem}/share/applications/* $out/share/applications/ makeWrapper ${jre}/bin/java $out/bin/jameica \ - --add-flags "-cp $out/share/java/jameica.jar:$out/share/${name}/* ${ + --add-flags "-cp $out/share/java/jameica.jar:$out/share/jameica-${version}/* ${ lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread'' } de.willuhn.jameica.Main" \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ diff --git a/pkgs/applications/radio/rtl-ais/default.nix b/pkgs/applications/radio/rtl-ais/default.nix index 7fd37d21fe16..243d3126b5f4 100644 --- a/pkgs/applications/radio/rtl-ais/default.nix +++ b/pkgs/applications/radio/rtl-ais/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, pkg-config, libusb1, rtl-sdr }: stdenv.mkDerivation { - name = "rtl-ais"; + pname = "rtl-ais"; version = "0.8.1"; buildInputs = [ pkg-config rtl-sdr libusb1 ]; diff --git a/pkgs/applications/radio/sdrplay/default.nix b/pkgs/applications/radio/sdrplay/default.nix index d12b12ecc13c..441ff1cf0f3d 100644 --- a/pkgs/applications/radio/sdrplay/default.nix +++ b/pkgs/applications/radio/sdrplay/default.nix @@ -4,7 +4,7 @@ let else if stdenv.isi686 then "i686" else throw "unsupported architecture"; in stdenv.mkDerivation rec { - name = "sdrplay"; + pname = "sdrplay"; version = "3.07.1"; src = fetchurl { diff --git a/pkgs/applications/radio/soapysdrplay/default.nix b/pkgs/applications/radio/soapysdrplay/default.nix index dbee593bd0d6..d205462fb604 100644 --- a/pkgs/applications/radio/soapysdrplay/default.nix +++ b/pkgs/applications/radio/soapysdrplay/default.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchFromGitHub, cmake, pkg-config, soapysdr, sdrplay }: stdenv.mkDerivation { - name = "soapysdr-sdrplay3"; - version = "20210425"; + pname = "soapysdr-sdrplay3"; + version = "unstable-2021-04-25"; src = fetchFromGitHub { owner = "pothosware"; diff --git a/pkgs/applications/radio/soundmodem/default.nix b/pkgs/applications/radio/soundmodem/default.nix index bedcc8b02c4e..01a8006822f6 100644 --- a/pkgs/applications/radio/soundmodem/default.nix +++ b/pkgs/applications/radio/soundmodem/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2 }: stdenv.mkDerivation rec { - name = "soundmodem"; + pname = "soundmodem"; version = "0.20"; src = fetchurl { - url = "https://archive.org/download/${name}-${version}/${name}-${version}.tar.gz"; + url = "https://archive.org/download/soundmodem-${version}/soundmodem-${version}.tar.gz"; sha256 = "156l3wjnh5rcisxb42kcmlf74swf679v4xnj09zy5j74rd4h721z"; }; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ''; #homepage = "http://gna.org/projects/soundmodem"; # official, but "Connection refused" homepage = "http://soundmodem.vk4msl.id.au/"; - downloadPage = "https://archive.org/download/${name}-${version}/${name}-${version}.tar.gz"; + downloadPage = "https://archive.org/download/${pname}-${version}/${pname}-${version}.tar.gz"; license = licenses.gpl2Only; maintainers = with maintainers; [ ymarkus ]; platforms = platforms.all; diff --git a/pkgs/applications/science/biology/ncbi-tools/default.nix b/pkgs/applications/science/biology/ncbi-tools/default.nix index 0e273dbefaac..dff041971ea7 100644 --- a/pkgs/applications/science/biology/ncbi-tools/default.nix +++ b/pkgs/applications/science/biology/ncbi-tools/default.nix @@ -8,10 +8,10 @@ # Another note: you may want the older and deprecated C-libs at ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/Mar_17_2008/NCBI_C_Toolkit/ncbi_c--Mar_17_2008.tar.gz stdenv.mkDerivation rec { - name = "ncbi_tools"; - ncbi_version = "Dec_31_2008"; + pname = "ncbi_tools"; + version = "Dec_31_2008"; src = fetchurl { - url = "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/${ncbi_version}/ncbi_cxx--${ncbi_version}.tar.gz"; + url = "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/${version}/ncbi_cxx--${version}.tar.gz"; sha256 = "1b2v0dcdqn3bysgdkj57sxmd6s0hc9wpnxssviz399g6plhxggbr"; }; diff --git a/pkgs/applications/science/electronics/xcircuit/default.nix b/pkgs/applications/science/electronics/xcircuit/default.nix index 68322a191787..eb2a29382e60 100644 --- a/pkgs/applications/science/electronics/xcircuit/default.nix +++ b/pkgs/applications/science/electronics/xcircuit/default.nix @@ -1,16 +1,12 @@ { lib, stdenv, fetchurl, autoreconfHook, automake, pkg-config , cairo, ghostscript, ngspice, tcl, tk, xorg, zlib }: -let +stdenv.mkDerivation rec { version = "3.10.12"; - name = "xcircuit-${version}"; - inherit (lib) getBin; - -in stdenv.mkDerivation { - inherit name version; + pname = "xcircuit"; src = fetchurl { - url = "http://opencircuitdesign.com/xcircuit/archive/${name}.tgz"; + url = "http://opencircuitdesign.com/xcircuit/archive/xcircuit-${version}.tgz"; sha256 = "1h1ywc3mr7plvwnhdii2zgnnv5ih2nhyl4qbdjpi83dq0aq1s2mn"; }; @@ -20,7 +16,7 @@ in stdenv.mkDerivation { configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" - "--with-ngspice=${getBin ngspice}/bin/ngspice" + "--with-ngspice=${lib.getBin ngspice}/bin/ngspice" ]; buildInputs = with xorg; [ cairo ghostscript libSM libXt libICE libX11 libXpm tcl tk zlib ]; diff --git a/pkgs/applications/science/logic/z3/4.4.0.nix b/pkgs/applications/science/logic/z3/4.4.0.nix index 2fbaa0a28caf..a3d6c16fb7df 100644 --- a/pkgs/applications/science/logic/z3/4.4.0.nix +++ b/pkgs/applications/science/logic/z3/4.4.0.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, python }: stdenv.mkDerivation rec { - name = "z3-${version}"; + pname = "z3"; version = "4.4.0"; src = fetchFromGitHub { diff --git a/pkgs/applications/science/math/fricas/default.nix b/pkgs/applications/science/math/fricas/default.nix index 79d5664426be..8c2541fe4129 100644 --- a/pkgs/applications/science/math/fricas/default.nix +++ b/pkgs/applications/science/math/fricas/default.nix @@ -1,14 +1,11 @@ { lib, stdenv, fetchurl, sbcl, libX11, libXpm, libICE, libSM, libXt, libXau, libXdmcp }: -let +stdenv.mkDerivation rec { + pname = "fricas"; version = "1.3.7"; - name = "fricas-" + version; -in -stdenv.mkDerivation { - inherit name; src = fetchurl { - url = "mirror://sourceforge/fricas/fricas/${version}/${name}-full.tar.bz2"; + url = "mirror://sourceforge/fricas/fricas/${version}/fricas-${version}-full.tar.bz2"; sha256 = "sha256-cOqMvSe3ef/ZeVy5cj/VU/aTRtxgfxZfRbE4lWE5TU4="; }; diff --git a/pkgs/applications/science/math/scilab-bin/default.nix b/pkgs/applications/science/math/scilab-bin/default.nix index 18dba2952cad..65d8c145bef6 100644 --- a/pkgs/applications/science/math/scilab-bin/default.nix +++ b/pkgs/applications/science/math/scilab-bin/default.nix @@ -1,11 +1,7 @@ { stdenv, fetchurl, lib, xorg }: let - name = "scilab-bin-${ver}"; - - ver = "6.1.1"; - - badArch = throw "${name} requires i686-linux or x86_64-linux"; + badArch = throw "scilab-bin requires i686-linux or x86_64-linux"; architecture = if stdenv.hostPlatform.system == "i686-linux" then @@ -15,11 +11,12 @@ let else badArch; in -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + pname = "scilab-bin"; + version = "6.1.1"; src = fetchurl { - url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz"; + url = "https://www.scilab.org/download/${version}/scilab-${version}.bin.linux-${architecture}.tar.gz"; sha256 = if stdenv.hostPlatform.system == "i686-linux" then "0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib" @@ -43,7 +40,7 @@ stdenv.mkDerivation { sed -i 's|\$(/bin/|$(|g' bin/scilab sed -i 's|/usr/bin/||g' bin/scilab - sci="$out/opt/scilab-${ver}" + sci="$out/opt/scilab-${version}" fullLibPath="$sci/lib/scilab:$sci/lib/thirdparty:$libPath" fullLibPath="$fullLibPath:$sci/lib/thirdparty/redist" @@ -55,31 +52,31 @@ stdenv.mkDerivation { ''; installPhase = '' - mkdir -p "$out/opt/scilab-${ver}" - cp -r . "$out/opt/scilab-${ver}/" + mkdir -p "$out/opt/scilab-${version}" + cp -r . "$out/opt/scilab-${version}/" # Create bin/ dir mkdir "$out/bin" # Creating executable symlinks - ln -s "$out/opt/scilab-${ver}/bin/scilab" "$out/bin/scilab" - ln -s "$out/opt/scilab-${ver}/bin/scilab-cli" "$out/bin/scilab-cli" - ln -s "$out/opt/scilab-${ver}/bin/scilab-adv-cli" "$out/bin/scilab-adv-cli" + ln -s "$out/opt/scilab-${version}/bin/scilab" "$out/bin/scilab" + ln -s "$out/opt/scilab-${version}/bin/scilab-cli" "$out/bin/scilab-cli" + ln -s "$out/opt/scilab-${version}/bin/scilab-adv-cli" "$out/bin/scilab-adv-cli" # Creating desktop config dir mkdir -p "$out/share/applications" # Moving desktop config files - mv $out/opt/scilab-${ver}/share/applications/*.desktop $out/share/applications + mv $out/opt/scilab-${version}/share/applications/*.desktop $out/share/applications # Fixing Exec paths and launching each app with a terminal - sed -i -e "s|Exec=|Exec=$out/opt/scilab-${ver}/bin/|g" \ + sed -i -e "s|Exec=|Exec=$out/opt/scilab-${version}/bin/|g" \ -e "s|Terminal=.*$|Terminal=true|g" $out/share/applications/*.desktop # Moving icons to the appropriate locations - for path in $out/opt/scilab-${ver}/share/icons/hicolor/*/*/* + for path in $out/opt/scilab-${version}/share/icons/hicolor/*/*/* do - newpath=$(echo $path | sed 's|/opt/scilab-${ver}||g') + newpath=$(echo $path | sed 's|/opt/scilab-${version}||g') filename=$(echo $path | sed 's|.*/||g') dir=$(echo $newpath | sed "s|$filename||g") mkdir -p $dir @@ -87,10 +84,10 @@ stdenv.mkDerivation { done # Removing emptied folders - rm -rf $out/opt/scilab-${ver}/share/{applications,icons} + rm -rf $out/opt/scilab-${version}/share/{applications,icons} # Moving other share/ folders - mv $out/opt/scilab-${ver}/share/{appdata,locale,mime} $out/share + mv $out/opt/scilab-${version}/share/{appdata,locale,mime} $out/share ''; meta = { diff --git a/pkgs/applications/science/misc/fityk/default.nix b/pkgs/applications/science/misc/fityk/default.nix index 974fd3ece45c..a3d6e1564666 100644 --- a/pkgs/applications/science/misc/fityk/default.nix +++ b/pkgs/applications/science/misc/fityk/default.nix @@ -1,12 +1,9 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, boost, lua, zlib, bzip2 , xylib, readline, gnuplot, swig3 }: -let - name = "fityk"; +stdenv.mkDerivation rec { + pname = "fityk"; version = "1.3.1"; -in -stdenv.mkDerivation { - name = "${name}-${version}"; src = fetchFromGitHub { owner = "wojdyr"; diff --git a/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix b/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix index 88dae0a34ff5..7824fa2a814b 100644 --- a/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix +++ b/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, xrdb, xlsfonts }: stdenv.mkDerivation rec { - name = "urxvt-font-size"; + pname = "urxvt-font-size"; version = "1.3"; src = fetchFromGitHub { diff --git a/pkgs/applications/terminal-emulators/termonad/default.nix b/pkgs/applications/terminal-emulators/termonad/default.nix index 111d790c6955..efddfa454668 100644 --- a/pkgs/applications/terminal-emulators/termonad/default.nix +++ b/pkgs/applications/terminal-emulators/termonad/default.nix @@ -3,7 +3,8 @@ let termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self); in stdenv.mkDerivation { - name = "termonad-with-packages-${termonadEnv.version}"; + pname = "termonad-with-packages"; + inherit (termonadEnv) version; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix b/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix index 42ac2ed4508f..7de53c7c541f 100644 --- a/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix +++ b/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix @@ -1,50 +1,46 @@ { lib, stdenv, fetchurl, jre, makeWrapper }: -let +stdenv.mkDerivation rec { + pname = "bfg-repo-cleaner"; version = "1.13.0"; + jarName = "bfg-${version}.jar"; - mavenUrl = "mirror://maven/com/madgag/bfg/${version}/${jarName}"; -in - stdenv.mkDerivation { - inherit version jarName; - name = "bfg-repo-cleaner-${version}"; + src = fetchurl { + url = "mirror://maven/com/madgag/bfg/${version}/${jarName}"; + sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz"; + }; - src = fetchurl { - url = mavenUrl; - sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz"; - }; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ jre ]; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ jre ]; + dontUnpack = true; - dontUnpack = true; + installPhase = '' + mkdir -p $out/share/java + mkdir -p $out/bin + cp $src $out/share/java/$jarName + makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main" + ''; - installPhase = '' - mkdir -p $out/share/java - mkdir -p $out/bin - cp $src $out/share/java/$jarName - makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main" + meta = with lib; { + homepage = "https://rtyley.github.io/bfg-repo-cleaner/"; + # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner + description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster"; + longDescription = '' + The BFG is a simpler, faster alternative to git-filter-branch for + cleansing bad data out of your Git repository history, in particular removing + crazy big files and removing passwords, credentials, and other private data. + + The git-filter-branch command is enormously powerful and can do things + that the BFG can't - but the BFG is much better for the tasks above, because + it's faster (10-720x), simpler (dedicated to just removing things), and + beautiful (can use Scala instead of bash to script customizations). ''; + license = licenses.gpl3; + maintainers = [ maintainers.changlinli ]; + platforms = platforms.unix; + downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}"; + }; - meta = with lib; { - homepage = "https://rtyley.github.io/bfg-repo-cleaner/"; - # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner - description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster"; - longDescription = '' - The BFG is a simpler, faster alternative to git-filter-branch for - cleansing bad data out of your Git repository history, in particular removing - crazy big files and removing passwords, credentials, and other private data. - - The git-filter-branch command is enormously powerful and can do things - that the BFG can't - but the BFG is much better for the tasks above, because - it's faster (10-720x), simpler (dedicated to just removing things), and - beautiful (can use Scala instead of bash to script customizations). - ''; - license = licenses.gpl3; - maintainers = [ maintainers.changlinli ]; - platforms = platforms.unix; - downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}"; - }; - - } +} diff --git a/pkgs/applications/version-management/git-and-tools/git-secret/default.nix b/pkgs/applications/version-management/git-and-tools/git-secret/default.nix index e3845af8926d..4c50836cfdb2 100644 --- a/pkgs/applications/version-management/git-and-tools/git-secret/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-secret/default.nix @@ -1,14 +1,11 @@ { stdenv, lib, fetchFromGitHub, makeWrapper, git, gnupg, gawk }: -let +stdenv.mkDerivation rec { + pname = "git-secret"; version = "0.4.0"; - repo = "git-secret"; - -in stdenv.mkDerivation { - name = "${repo}-${version}"; src = fetchFromGitHub { - inherit repo; + repo = "git-secret"; owner = "sobolevn"; rev = "v${version}"; sha256 = "sha256-Mtuj+e/yCDr4XkmYkWUFJB3cqOT5yOMOq9P/QJV1S80="; diff --git a/pkgs/applications/video/p2pvc/default.nix b/pkgs/applications/video/p2pvc/default.nix index 35dceddf224e..f64af16709f6 100644 --- a/pkgs/applications/video/p2pvc/default.nix +++ b/pkgs/applications/video/p2pvc/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, pkg-config, fetchFromGitHub, opencv2, ncurses, portaudio }: stdenv.mkDerivation { - name = "p2pvc"; + pname = "p2pvc"; + version = "unstable-2015-02-12"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ opencv2 ncurses portaudio ]; diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 7adcd328add7..843cebe7d6ba 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -22,7 +22,8 @@ let in edk2.mkDerivation projectDscPath { - name = "OVMF-${version}"; + pname = "OVMF"; + inherit version; outputs = [ "out" "fd" ]; diff --git a/pkgs/applications/virtualization/docker/gc.nix b/pkgs/applications/virtualization/docker/gc.nix index 52ca54501d75..0736516ee7d2 100644 --- a/pkgs/applications/virtualization/docker/gc.nix +++ b/pkgs/applications/virtualization/docker/gc.nix @@ -3,13 +3,13 @@ with lib; stdenv.mkDerivation rec { - name = "docker-gc-${rev}"; - rev = "b0cc52aa3da2e2ac0080794e0be6e674b1f063fc"; + pname = "docker-gc"; + version = "unstable-2015-10-5"; src = fetchFromGitHub { - inherit rev; owner = "spotify"; repo = "docker-gc"; + rev = "b0cc52aa3da2e2ac0080794e0be6e674b1f063fc"; sha256 = "07wf9yn0f771xkm3x12946x5rp83hxjkd70xgfgy35zvj27wskzm"; }; diff --git a/pkgs/applications/virtualization/docker/proxy.nix b/pkgs/applications/virtualization/docker/proxy.nix index a247e2cecfaf..6038a129e2a1 100644 --- a/pkgs/applications/virtualization/docker/proxy.nix +++ b/pkgs/applications/virtualization/docker/proxy.nix @@ -1,13 +1,13 @@ { lib, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { - name = "docker-proxy-${rev}"; - rev = "fa125a3512ee0f6187721c88582bf8c4378bd4d7"; + pname = "docker-proxy"; + version = "unstable-2020-12-15"; src = fetchFromGitHub { - inherit rev; owner = "docker"; repo = "libnetwork"; + rev = "fa125a3512ee0f6187721c88582bf8c4378bd4d7"; sha256 = "1r47y0gww3j7fas4kgiqbhrz5fazsx1c6sxnccdfhj8fzik77s9y"; }; diff --git a/pkgs/applications/virtualization/gvisor/containerd-shim.nix b/pkgs/applications/virtualization/gvisor/containerd-shim.nix index c8610b73865b..612ef0f4b536 100644 --- a/pkgs/applications/virtualization/gvisor/containerd-shim.nix +++ b/pkgs/applications/virtualization/gvisor/containerd-shim.nix @@ -1,8 +1,8 @@ { lib, fetchFromGitHub, buildGoModule }: buildGoModule rec { - name = "gvisor-containerd-shim-${version}"; - version = "2019-10-09"; + pname = "gvisor-containerd-shim"; + version = "unstable-2019-10-09"; src = fetchFromGitHub { owner = "google"; diff --git a/pkgs/applications/virtualization/gvisor/default.nix b/pkgs/applications/virtualization/gvisor/default.nix index 4cd043d4eb6d..cf6f2102e6ac 100644 --- a/pkgs/applications/virtualization/gvisor/default.nix +++ b/pkgs/applications/virtualization/gvisor/default.nix @@ -52,7 +52,7 @@ let }; in buildBazelPackage rec { - name = "gvisor-${version}"; + pname = "gvisor"; version = "20210518.0"; src = fetchFromGitHub { diff --git a/pkgs/applications/virtualization/qemu/utils.nix b/pkgs/applications/virtualization/qemu/utils.nix index 90783039a1a0..d9a88bf545b3 100644 --- a/pkgs/applications/virtualization/qemu/utils.nix +++ b/pkgs/applications/virtualization/qemu/utils.nix @@ -1,8 +1,8 @@ { stdenv, installShellFiles, qemu }: stdenv.mkDerivation rec { - name = "qemu-utils-${version}"; - version = qemu.version; + pname = "qemu-utils"; + inherit (qemu) version; nativeBuildInputs = [ installShellFiles ]; buildInputs = [ qemu ]; diff --git a/pkgs/applications/virtualization/virt-viewer/default.nix b/pkgs/applications/virtualization/virt-viewer/default.nix index 29e05a069ce7..86474da9ee61 100644 --- a/pkgs/applications/virtualization/virt-viewer/default.nix +++ b/pkgs/applications/virtualization/virt-viewer/default.nix @@ -35,12 +35,11 @@ assert spiceSupport -> ( with lib; stdenv.mkDerivation rec { - baseName = "virt-viewer"; + pname = "virt-viewer"; version = "11.0"; - name = "${baseName}-${version}"; src = fetchurl { - url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.xz"; + url = "https://releases.pagure.org/virt-viewer/virt-viewer-${version}.tar.xz"; sha256 = "sha256-pD+iMlxMHHelyMmAZaww7wURohrJjlkPIjQIabrZq9A="; }; diff --git a/pkgs/applications/window-managers/clfswm/default.nix b/pkgs/applications/window-managers/clfswm/default.nix index 1c6f92a38f29..9984e8788460 100644 --- a/pkgs/applications/window-managers/clfswm/default.nix +++ b/pkgs/applications/window-managers/clfswm/default.nix @@ -2,11 +2,12 @@ , makeWrapper }: stdenv.mkDerivation { - name = "clfswm"; + pname = "clfswm"; + version = "unstable-2016-11-12"; src = fetchgit { url = "https://gitlab.common-lisp.net/clfswm/clfswm.git"; - rev = "refs/heads/master"; + rev = "3c7721dba6339ebb4f8c8d7ce2341740fa86f837"; sha256 = "0hynzh3a1zr719cxfb0k4cvh5lskzs616hwn7p942isyvhwzhynd"; }; diff --git a/pkgs/applications/window-managers/taffybar/default.nix b/pkgs/applications/window-managers/taffybar/default.nix index 7d9e5f9c1cb0..2afb6e505c33 100644 --- a/pkgs/applications/window-managers/taffybar/default.nix +++ b/pkgs/applications/window-managers/taffybar/default.nix @@ -5,7 +5,8 @@ let self.taffybar ] ++ packages self); in stdenv.mkDerivation { - name = "taffybar-with-packages-${taffybarEnv.version}"; + pname = "taffybar-with-packages"; + inherit (taffybarEnv) version; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/window-managers/xmonad/wrapper.nix b/pkgs/applications/window-managers/xmonad/wrapper.nix index f5c9f12a23f6..409bf73c893f 100644 --- a/pkgs/applications/window-managers/xmonad/wrapper.nix +++ b/pkgs/applications/window-managers/xmonad/wrapper.nix @@ -3,7 +3,8 @@ let xmonadEnv = ghcWithPackages (self: [ self.xmonad ] ++ packages self); in stdenv.mkDerivation { - name = "xmonad-with-packages-${xmonadEnv.version}"; + pname = "xmonad-with-packages"; + inherit (xmonadEnv) version; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/data/documentation/std-man-pages/default.nix b/pkgs/data/documentation/std-man-pages/default.nix index a2f9f005eb93..c9ce9c2bf764 100644 --- a/pkgs/data/documentation/std-man-pages/default.nix +++ b/pkgs/data/documentation/std-man-pages/default.nix @@ -1,10 +1,11 @@ { stdenv, lib, fetchurl }: -stdenv.mkDerivation { - name = "std-man-pages-4.4.0"; +stdenv.mkDerivation rec { + pname = "std-man-pages"; + version = "4.4.0"; src = fetchurl { - url = "mirror://gcc/libstdc++/doxygen/libstdc++-man.4.4.0.tar.bz2"; + url = "mirror://gcc/libstdc++/doxygen/libstdc++-man.${version}.tar.bz2"; sha256 = "0153py77ll759jacq41dp2z2ksr08pdcfic0rwjd6pr84dk89y9v"; }; diff --git a/pkgs/data/icons/faba-icon-theme/default.nix b/pkgs/data/icons/faba-icon-theme/default.nix index 6ccd4c4622fa..1119e248522a 100644 --- a/pkgs/data/icons/faba-icon-theme/default.nix +++ b/pkgs/data/icons/faba-icon-theme/default.nix @@ -1,13 +1,12 @@ { lib, stdenv, fetchFromGitHub, meson, ninja, python3, gtk3, pantheon, gnome-icon-theme, hicolor-icon-theme }: stdenv.mkDerivation rec { - name = "${package-name}-${version}"; - package-name = "faba-icon-theme"; + pname = "faba-icon-theme"; version = "4.3"; src = fetchFromGitHub { owner = "moka-project"; - repo = package-name; + repo = "faba-icon-theme"; rev = "v${version}"; sha256 = "0xh6ppr73p76z60ym49b4d0liwdc96w41cc5p07d48hxjsa6qd6n"; }; diff --git a/pkgs/data/icons/tango-icon-theme/default.nix b/pkgs/data/icons/tango-icon-theme/default.nix index 09d0875ca8a3..9e6b0666a118 100644 --- a/pkgs/data/icons/tango-icon-theme/default.nix +++ b/pkgs/data/icons/tango-icon-theme/default.nix @@ -3,10 +3,11 @@ }: stdenv.mkDerivation rec { - name = "tango-icon-theme-0.8.90"; + pname = "tango-icon-theme"; + version = "0.8.90"; src = fetchurl { - url = "http://tango.freedesktop.org/releases/${name}.tar.gz"; + url = "http://tango.freedesktop.org/releases/tango-icon-theme-${version}.tar.gz"; sha256 = "13n8cpml71w6zfm2jz5fa7r1z18qlzk4gv07r6n1in2p5l1xi63f"; }; diff --git a/pkgs/data/misc/brise/default.nix b/pkgs/data/misc/brise/default.nix index f4e1a6d2905f..45f86f6be21c 100644 --- a/pkgs/data/misc/brise/default.nix +++ b/pkgs/data/misc/brise/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchFromGitHub, librime }: stdenv.mkDerivation { - name = "brise-unstable-2017-09-16"; + pname = "brise"; + version = "unstable-2017-09-16"; src = fetchFromGitHub { owner = "rime"; diff --git a/pkgs/data/misc/miscfiles/default.nix b/pkgs/data/misc/miscfiles/default.nix index 783dc29ecb2d..ad58e5bd7b79 100644 --- a/pkgs/data/misc/miscfiles/default.nix +++ b/pkgs/data/misc/miscfiles/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl}: stdenv.mkDerivation rec { - name = "miscfiles-1.5"; + pname = "miscfiles"; + version = "1.5"; src = fetchurl { - url = "mirror://gnu/miscfiles/${name}.tar.gz"; + url = "mirror://gnu/miscfiles/miscfiles-${version}.tar.gz"; sha256 = "005588vfrwx8ghsdv9p7zczj9lbc9a3r4m5aphcaqv8gif4siaka"; }; diff --git a/pkgs/data/misc/shared-desktop-ontologies/default.nix b/pkgs/data/misc/shared-desktop-ontologies/default.nix index 88f9eec8fcad..fd797d8d63f0 100644 --- a/pkgs/data/misc/shared-desktop-ontologies/default.nix +++ b/pkgs/data/misc/shared-desktop-ontologies/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, cmake }: stdenv.mkDerivation rec { - name = "shared-desktop-ontologies-0.11.0"; + pname = "shared-desktop-ontologies"; + version = "0.11.0"; src = fetchurl { - url = "mirror://sourceforge/oscaf/${name}.tar.bz2"; + url = "mirror://sourceforge/oscaf/shared-desktop-ontologies-${version}.tar.bz2"; sha256 = "1m5vnijg7rnwg41vig2ckg632dlczzdab1gsq51g4x7m9k1fdbw2"; };