From 5937fc0f8c4cb45f5458a48b3ed987bd8062bf75 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 12 Aug 2021 23:00:21 +0200 Subject: [PATCH] misc: replace name with pname&version --- .../cups/drivers/brgenml1cupswrapper/default.nix | 5 +++-- pkgs/misc/cups/drivers/brgenml1lpr/default.nix | 5 +++-- pkgs/misc/cups/drivers/cups-bjnp/default.nix | 5 +++-- pkgs/misc/cups/drivers/splix/default.nix | 9 +++++---- .../epson-workforce-635-nx625-series/default.nix | 12 ++++++------ pkgs/misc/drivers/foomatic-filters/default.nix | 5 +++-- pkgs/misc/drivers/gutenprint/default.nix | 5 +++-- pkgs/misc/drivers/m33-linux/default.nix | 3 ++- pkgs/misc/drivers/xwiimote/default.nix | 6 ++++-- pkgs/misc/emulators/bsod/default.nix | 7 ++++--- pkgs/misc/emulators/dosbox/default.nix | 5 +++-- pkgs/misc/emulators/fakenes/default.nix | 8 +++++--- pkgs/misc/emulators/gens-gs/default.nix | 7 ++++--- pkgs/misc/emulators/uae/default.nix | 5 +++-- pkgs/misc/emulators/vice/default.nix | 5 +++-- pkgs/misc/emulators/wxmupen64plus/default.nix | 8 +++++--- pkgs/misc/emulators/zsnes/default.nix | 3 ++- pkgs/misc/screensavers/slock/default.nix | 5 +++-- pkgs/misc/screensavers/vlock/default.nix | 11 ++++++----- pkgs/misc/screensavers/xlockmore/default.nix | 5 +++-- pkgs/misc/screensavers/xss-lock/default.nix | 3 ++- pkgs/misc/screensavers/xtrlock-pam/default.nix | 3 ++- pkgs/misc/solfege/default.nix | 5 +++-- 23 files changed, 80 insertions(+), 55 deletions(-) diff --git a/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix index ec02e8c4f0e0..e309e8e8b264 100644 --- a/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix +++ b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix @@ -52,10 +52,11 @@ */ stdenv.mkDerivation rec { + pname = "brgenml1cupswrapper"; + version = "3.1.0-1"; - name = "brgenml1cupswrapper-3.1.0-1"; src = fetchurl { - url = "https://download.brother.com/welcome/dlf101125/${name}.i386.deb"; + url = "https://download.brother.com/welcome/dlf101125/brgenml1cupswrapper-${version}.i386.deb"; sha256 = "0kd2a2waqr10kfv1s8is3nd5dlphw4d1343srdsbrlbbndja3s6r"; }; diff --git a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix index 6cdff2c4124e..fd439e9cd73d 100644 --- a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix +++ b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix @@ -35,10 +35,11 @@ let ''; in stdenv.mkDerivation rec { + pname = "brgenml1lpr"; + version = "3.1.0-1"; - name = "brgenml1lpr-3.1.0-1"; src = fetchurl { - url = "https://download.brother.com/welcome/dlf101123/${name}.i386.deb"; + url = "https://download.brother.com/welcome/dlf101123/brgenml1lpr-${version}.i386.deb"; sha256 = "0zdvjnrjrz9sba0k525linxp55lr4cyivfhqbkq1c11br2nvy09f"; }; diff --git a/pkgs/misc/cups/drivers/cups-bjnp/default.nix b/pkgs/misc/cups/drivers/cups-bjnp/default.nix index 40243bb91969..5a6ea08a8e16 100644 --- a/pkgs/misc/cups/drivers/cups-bjnp/default.nix +++ b/pkgs/misc/cups/drivers/cups-bjnp/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl, cups}: stdenv.mkDerivation rec { - name = "cups-bjnp-1.2.2"; + pname = "cups-bjnp"; + version = "1.2.2"; src = fetchurl { - url = "mirror://sourceforge/cups-bjnp/${name}.tar.gz"; + url = "mirror://sourceforge/cups-bjnp/cups-bjnp-${version}.tar.gz"; sha256 = "0sb0vm1sf8ismzd9ba33qswxmsirj2z1b7lnyrc9v5ixm7q0bnrm"; }; diff --git a/pkgs/misc/cups/drivers/splix/default.nix b/pkgs/misc/cups/drivers/splix/default.nix index eae421240630..cfe53e48d679 100644 --- a/pkgs/misc/cups/drivers/splix/default.nix +++ b/pkgs/misc/cups/drivers/splix/default.nix @@ -3,7 +3,8 @@ let color-profiles = stdenv.mkDerivation { - name = "splix-color-profiles-20070625"; + pname = "splix-color-profiles"; + version = "unstable-2007-06-25"; src = fetchurl { url = "http://splix.ap2c.org/samsung_cms.tar.bz2"; @@ -17,14 +18,14 @@ let }; in stdenv.mkDerivation rec { - name = "splix-svn-${rev}"; - rev = "315"; + pname = "splix-svn"; + version = "315"; src = fetchsvn { # We build this from svn, because splix hasn't been in released in several years # although the community has been adding some new printer models. url = "svn://svn.code.sf.net/p/splix/code/splix"; - inherit rev; + rev = version; sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl"; }; diff --git a/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix b/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix index e06a0c911624..73d88ad19c24 100644 --- a/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix +++ b/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix @@ -9,14 +9,14 @@ let driver = "epson-inkjet-printer-workforce-635-nx625-series-1.0.1"; }; in stdenv.mkDerivation rec { - name = "epson-inkjet-printer-workforce-635-nx625-series"; + pname = "epson-inkjet-printer-workforce-635-nx625-series"; version = "1.0.1"; src = fetchurl { # NOTE: Don't forget to update the webarchive link too! urls = [ - "https://download.ebz.epson.net/dsc/op/stable/SRPMS/${name}-${version}-1lsb3.2.src.rpm" - "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/${name}-${version}-1lsb3.2.src.rpm" + "https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm" + "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm" ]; sha256 = "19nb2h0y9rvv6rg7j262f8sqap9kjvz8kmisxnjg1w0v19zb9zf2"; }; @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { let filterdir = "$out/cups/lib/filter"; docdir = "$out/share/doc"; - ppddir = "$out/share/cups/model/${name}"; + ppddir = "$out/share/cups/model/${pname}"; libdir = if stdenv.system == "x86_64-linux" then "lib64" else if stdenv.system == "i686_linux" then "lib" @@ -51,7 +51,7 @@ in stdenv.mkDerivation rec { cd ../${srcdirs.driver} for ppd in ppds/*; do - substituteInPlace "$ppd" --replace '/opt/${name}' "$out" + substituteInPlace "$ppd" --replace '/opt/${pname}' "$out" gzip -c "$ppd" > "${ppddir}/''${ppd#*/}" done cp COPYING.EPSON README "${docdir}" @@ -91,7 +91,7 @@ in stdenv.mkDerivation rec { To use the driver adjust your configuration.nix file: services.printing = { enable = true; - drivers = [ pkgs.${name} ]; + drivers = [ pkgs.${pname} ]; }; ''; downloadPage = "https://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16857&DSCCHK=4334d3487503d7f916ccf5d58071b05b7687294f"; diff --git a/pkgs/misc/drivers/foomatic-filters/default.nix b/pkgs/misc/drivers/foomatic-filters/default.nix index db1da676a515..5804eb60930d 100644 --- a/pkgs/misc/drivers/foomatic-filters/default.nix +++ b/pkgs/misc/drivers/foomatic-filters/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchpatch, fetchurl, pkg-config, perl, cups, dbus, enscript }: stdenv.mkDerivation rec { - name = "foomatic-filters-4.0.17"; + pname = "foomatic-filters"; + version = "4.0.17"; src = fetchurl { - url = "https://www.openprinting.org/download/foomatic/${name}.tar.gz"; + url = "https://www.openprinting.org/download/foomatic/foomatic-filters-${version}.tar.gz"; sha256 = "1qrkgbm5jay2r7sh9qbyf0aiyrsl1mdc844hxf7fhw95a0zfbqm2"; }; diff --git a/pkgs/misc/drivers/gutenprint/default.nix b/pkgs/misc/drivers/gutenprint/default.nix index 9cd76c11ccea..6b1bfefd7014 100644 --- a/pkgs/misc/drivers/gutenprint/default.nix +++ b/pkgs/misc/drivers/gutenprint/default.nix @@ -6,10 +6,11 @@ }: stdenv.mkDerivation rec { - name = "gutenprint-5.3.4"; + pname = "gutenprint"; + version = "5.3.4"; src = fetchurl { - url = "mirror://sourceforge/gimp-print/${name}.tar.bz2"; + url = "mirror://sourceforge/gimp-print/gutenprint-${version}.tar.bz2"; sha256 = "0s0b14hjwvbxksq7af5v8z9g2rfqv9jdmxd9d81m57f5mh6rad0p"; }; diff --git a/pkgs/misc/drivers/m33-linux/default.nix b/pkgs/misc/drivers/m33-linux/default.nix index d2ba2685a291..84272898f52c 100644 --- a/pkgs/misc/drivers/m33-linux/default.nix +++ b/pkgs/misc/drivers/m33-linux/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation { - name = "M33-Linux-2016-06-23"; + pname = "M33-Linux"; + version = "unstable-2016-06-23"; src = fetchFromGitHub { owner = "donovan6000"; diff --git a/pkgs/misc/drivers/xwiimote/default.nix b/pkgs/misc/drivers/xwiimote/default.nix index 8fafd1b6ebcc..414a207fa544 100644 --- a/pkgs/misc/drivers/xwiimote/default.nix +++ b/pkgs/misc/drivers/xwiimote/default.nix @@ -1,9 +1,11 @@ { lib, stdenv, udev, ncurses, pkg-config, fetchurl, bluez }: stdenv.mkDerivation rec { - name = "xwiimote-2"; + pname = "xwiimote"; + version = "2"; + src = fetchurl { - url = "https://github.com/dvdhrm/xwiimote/releases/download/${name}/${name}.tar.xz"; + url = "https://github.com/dvdhrm/xwiimote/releases/download/xwiimote-${version}/xwiimote-${version}.tar.xz"; sha256 = "1g9cbhblll47l300zr999xr51x2g98y49l222f77fhswd12kjzhd"; }; diff --git a/pkgs/misc/emulators/bsod/default.nix b/pkgs/misc/emulators/bsod/default.nix index 872ee8571f30..869440856f9a 100644 --- a/pkgs/misc/emulators/bsod/default.nix +++ b/pkgs/misc/emulators/bsod/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl, ncurses}: -stdenv.mkDerivation { - name = "bsod-0.1"; +stdenv.mkDerivation rec { + pname = "bsod"; + version = "0.1"; src = fetchurl { - url = "https://www.vanheusden.com/bsod/bsod-0.1.tgz"; + url = "https://www.vanheusden.com/bsod/bsod-${version}.tgz"; sha256 = "0hqwacazyq5rhc04j8w8w0j0dgb6ca8k66c9lxf6bsyi6wvbhvmd"; }; diff --git a/pkgs/misc/emulators/dosbox/default.nix b/pkgs/misc/emulators/dosbox/default.nix index 160c8733ff5c..ba4f88dbcad0 100644 --- a/pkgs/misc/emulators/dosbox/default.nix +++ b/pkgs/misc/emulators/dosbox/default.nix @@ -1,10 +1,11 @@ { stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU, libGL, libpng, graphicsmagick }: stdenv.mkDerivation rec { - name = "dosbox-0.74-3"; + pname = "dosbox"; + version = "0.74-3"; src = fetchurl { - url = "mirror://sourceforge/dosbox/${name}.tar.gz"; + url = "mirror://sourceforge/dosbox/dosbox-${version}.tar.gz"; sha256 = "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0"; }; diff --git a/pkgs/misc/emulators/fakenes/default.nix b/pkgs/misc/emulators/fakenes/default.nix index 2011d8ce0375..6bc4b1480ffc 100644 --- a/pkgs/misc/emulators/fakenes/default.nix +++ b/pkgs/misc/emulators/fakenes/default.nix @@ -1,10 +1,12 @@ {lib, stdenv, fetchurl, allegro, openal, libGLU, libGL, zlib, hawknl, freeglut, libX11, libXxf86vm, libXcursor, libXpm }: -stdenv.mkDerivation { - name = "fakenes-0.5.9b3"; +stdenv.mkDerivation rec { + pname = "fakenes"; + version = "0.5.9-beta3"; + src = fetchurl { - url = "mirror://sourceforge/fakenes/fakenes-0.5.9-beta3.tar.gz"; + url = "mirror://sourceforge/fakenes/fakenes-${version}.tar.gz"; sha256 = "026h67s4pzc1vma59pmzk02iy379255qbai2q74wln9bxqcpniy4"; }; diff --git a/pkgs/misc/emulators/gens-gs/default.nix b/pkgs/misc/emulators/gens-gs/default.nix index abc676ffa632..0fbd12fc3651 100644 --- a/pkgs/misc/emulators/gens-gs/default.nix +++ b/pkgs/misc/emulators/gens-gs/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, pkg-config, gtk2, SDL, nasm, zlib, libpng, libGLU, libGL }: -stdenv.mkDerivation { - name = "gens-gs-7"; +stdenv.mkDerivation rec { + pname = "gens-gs"; + version = "7"; src = fetchurl { - url = "http://retrocdn.net/images/6/6d/Gens-gs-r7.tar.gz"; + url = "http://retrocdn.net/images/6/6d/Gens-gs-r${version}.tar.gz"; sha256 = "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"; }; diff --git a/pkgs/misc/emulators/uae/default.nix b/pkgs/misc/emulators/uae/default.nix index 803efe5149c2..ebbdc667ef1e 100644 --- a/pkgs/misc/emulators/uae/default.nix +++ b/pkgs/misc/emulators/uae/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl, pkg-config, gtk2, alsa-lib, SDL}: stdenv.mkDerivation rec { - name = "uae-0.8.29"; + pname = "uae"; + version = "0.8.29"; src = fetchurl { - url = "http://web.archive.org/web/20130905032631/http://www.amigaemulator.org/files/sources/develop/${name}.tar.bz2"; + url = "http://web.archive.org/web/20130905032631/http://www.amigaemulator.org/files/sources/develop/uae-${version}.tar.bz2"; sha256 = "05s3cd1rd5a970s938qf4c2xm3l7f54g5iaqw56v8smk355m4qr4"; }; diff --git a/pkgs/misc/emulators/vice/default.nix b/pkgs/misc/emulators/vice/default.nix index f8b9e5906f3e..ba9d538b6631 100644 --- a/pkgs/misc/emulators/vice/default.nix +++ b/pkgs/misc/emulators/vice/default.nix @@ -3,10 +3,11 @@ }: stdenv.mkDerivation rec { - name = "vice-3.1"; + pname = "vice"; + version = "3.1"; src = fetchurl { - url = "mirror://sourceforge/vice-emu/vice-3.1.tar.gz"; + url = "mirror://sourceforge/vice-emu/vice-${version}.tar.gz"; sha256 = "0h0jbml02s2a36hr78dxv1zshmfhxp1wadpcdl09aq416fb1bf1y"; }; diff --git a/pkgs/misc/emulators/wxmupen64plus/default.nix b/pkgs/misc/emulators/wxmupen64plus/default.nix index 8621d213b79d..3b24584f7e63 100644 --- a/pkgs/misc/emulators/wxmupen64plus/default.nix +++ b/pkgs/misc/emulators/wxmupen64plus/default.nix @@ -1,10 +1,12 @@ { lib, stdenv, fetchurl, python, wxGTK29, mupen64plus, SDL, libX11, libGLU, libGL , wafHook }: -stdenv.mkDerivation { - name = "wxmupen64plus-0.3"; +stdenv.mkDerivation rec { + pname = "wxmupen64plus"; + version = "0.3"; + src = fetchurl { - url = "https://bitbucket.org/auria/wxmupen64plus/get/0.3.tar.bz2"; + url = "https://bitbucket.org/auria/wxmupen64plus/get/${version}.tar.bz2"; sha256 = "1mnxi4k011dd300k35li2p6x4wccwi6im21qz8dkznnz397ps67c"; }; diff --git a/pkgs/misc/emulators/zsnes/default.nix b/pkgs/misc/emulators/zsnes/default.nix index 4a6b1fbda279..e965816d0257 100644 --- a/pkgs/misc/emulators/zsnes/default.nix +++ b/pkgs/misc/emulators/zsnes/default.nix @@ -13,7 +13,8 @@ let }; in stdenv.mkDerivation { - name = "zsnes-1.51"; + pname = "zsnes"; + version = "1.51"; src = fetchFromGitHub { owner = "emillon"; diff --git a/pkgs/misc/screensavers/slock/default.nix b/pkgs/misc/screensavers/slock/default.nix index 800a81d2ffcd..63ca76e391f4 100644 --- a/pkgs/misc/screensavers/slock/default.nix +++ b/pkgs/misc/screensavers/slock/default.nix @@ -6,10 +6,11 @@ with lib; stdenv.mkDerivation rec { - name = "slock-1.4"; + pname = "slock"; + version = "1.4"; src = fetchurl { - url = "https://dl.suckless.org/tools/${name}.tar.gz"; + url = "https://dl.suckless.org/tools/slock-${version}.tar.gz"; sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m"; }; diff --git a/pkgs/misc/screensavers/vlock/default.nix b/pkgs/misc/screensavers/vlock/default.nix index 4813e2493075..1602c94c0992 100644 --- a/pkgs/misc/screensavers/vlock/default.nix +++ b/pkgs/misc/screensavers/vlock/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, pam }: -stdenv.mkDerivation { - name = "vlock-2.2.2"; - src = fetchurl - { - url = "mirror://debian/pool/main/v/vlock/vlock_2.2.2.orig.tar.gz"; +stdenv.mkDerivation rec { + pname = "vlock"; + version = "2.2.2"; + + src = fetchurl { + url = "mirror://debian/pool/main/v/vlock/vlock_${version}.orig.tar.gz"; sha256 = "1b9gv7hmlb8swda5bn40lp1yki8b8wv29vdnhcjqfl6ir98551za"; }; diff --git a/pkgs/misc/screensavers/xlockmore/default.nix b/pkgs/misc/screensavers/xlockmore/default.nix index 600528a79444..680f9c0a5bcb 100644 --- a/pkgs/misc/screensavers/xlockmore/default.nix +++ b/pkgs/misc/screensavers/xlockmore/default.nix @@ -2,10 +2,11 @@ , libXdmcp, libXt, autoreconfHook }: stdenv.mkDerivation rec { - name = "xlockmore-5.66"; + pname = "xlockmore"; + version = "5.66"; src = fetchurl { - url = "http://sillycycle.com/xlock/${name}.tar.xz"; + url = "http://sillycycle.com/xlock/xlockmore-${version}.tar.xz"; sha256 = "sha256-WXalw2YoKNFFIskOBvKN3PyOV3iP3gjri3pw6e87q3E="; curlOpts = "--user-agent 'Mozilla/5.0'"; }; diff --git a/pkgs/misc/screensavers/xss-lock/default.nix b/pkgs/misc/screensavers/xss-lock/default.nix index c6dafd2a8127..ec7e8f4e7e5c 100644 --- a/pkgs/misc/screensavers/xss-lock/default.nix +++ b/pkgs/misc/screensavers/xss-lock/default.nix @@ -2,7 +2,8 @@ , libXau, libXdmcp, xcbutil }: stdenv.mkDerivation { - name = "xss-lock-git-2018-05-31"; + pname = "xss-lock"; + version = "unstable-2018-05-31"; src = fetchFromGitHub { owner = "xdbob"; diff --git a/pkgs/misc/screensavers/xtrlock-pam/default.nix b/pkgs/misc/screensavers/xtrlock-pam/default.nix index c563cca05efe..6908429e21b9 100644 --- a/pkgs/misc/screensavers/xtrlock-pam/default.nix +++ b/pkgs/misc/screensavers/xtrlock-pam/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchgit, python, pkg-config, xlibsWrapper, pam }: stdenv.mkDerivation { - name = "xtrlock-pam-3.4-post-20150909"; + pname = "xtrlock-pam"; + version = "3.4-post-20150909"; src = fetchgit { url = "https://github.com/aanatoly/xtrlock-pam"; diff --git a/pkgs/misc/solfege/default.nix b/pkgs/misc/solfege/default.nix index fc7062d904c3..c3c22ac8f159 100644 --- a/pkgs/misc/solfege/default.nix +++ b/pkgs/misc/solfege/default.nix @@ -5,10 +5,11 @@ }: buildPythonApplication rec { - name = "solfege-3.23.4"; + pname = "solfege"; + version = "3.23.4"; src = fetchurl { - url = "mirror://sourceforge/solfege/${name}.tar.gz"; + url = "mirror://sourceforge/solfege/solfege-${version}.tar.gz"; sha256 = "0sc17vf4xz6gy0s0z9ghi68yskikdmyb4gdaxx6imrm40734k8mp"; };