Merge pull request #165303 from Stunkymonkey/treewide-pname-version-18

This commit is contained in:
Ben Siraphob 2022-03-24 22:55:34 -05:00 committed by GitHub
commit 1cf5591a99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 100 additions and 102 deletions

View File

@ -3,7 +3,6 @@
}:
let
version = "1.3.3";
airwave-src = fetchFromGitHub {
@ -38,7 +37,8 @@ let
in
multiStdenv.mkDerivation {
name = "airwave-${version}";
pname = "airwave";
inherit version;
src = airwave-src;

View File

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl, alsa-lib, jack2, minixml, pkg-config }:
stdenv.mkDerivation rec {
name = packageName + "-" + version ;
packageName = "aj-snapshot" ;
pname = "aj-snapshot" ;
version = "0.9.9";
src = fetchurl {
url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
url = "mirror://sourceforge/aj-snapshot/aj-snapshot-${version}.tar.bz2";
sha256 = "0z8wd5yvxdmw1h1rj6km9h01xd4xmp4d86gczlix7hsc7zrf0wil";
};

View File

@ -12,7 +12,7 @@
}:
stdenv.mkDerivation rec {
name = "ams";
pname = "ams";
version = "unstable-2019-04-27";
src = fetchgit {

View File

@ -2,7 +2,7 @@
pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}";
pname = "bitwig-studio";
version = "2.5";
src = fetchurl {

View File

@ -22,7 +22,7 @@
}:
stdenv.mkDerivation rec {
name = "cardinal-${version}";
pname = "cardinal";
version = "22.02";
src = fetchurl {

View File

@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
name = "cmt";
pname = "cmt";
version = "1.17";
src = fetchurl {
url = "http://www.ladspa.org/download/${name}_${version}.tgz";
url = "http://www.ladspa.org/download/cmt_${version}.tgz";
sha256 = "07xd0xmwpa0j12813jpf87fr9hwzihii5l35mp8ady7xxfmxfmpb";
};

View File

@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
version = "0.95.0";
name = "jamin-${version}";
pname = "jamin";
src = fetchurl {
url = "mirror://sourceforge/jamin/jamin-${version}.tar.gz";

View File

@ -1,10 +1,13 @@
{ lib, stdenv, fetchurl, alsa-lib, libX11, libXi, libXtst, xorgproto }:
{ lib, stdenv, fetchFromGitHub, alsa-lib, libX11, libXi, libXtst, xorgproto }:
stdenv.mkDerivation rec {
name = "mid2key-r1";
pname = "mid2key";
version = "1";
src = fetchurl {
url = "http://mid2key.googlecode.com/files/${name}.tar.gz";
src = fetchFromGitHub {
owner = "dnschneid";
repo = "mid2key";
rev = "v${version}";
sha256 = "0j2vsjvdgx51nd1qmaa18mcy0yw9pwrhbv2mdwnf913bwsk4y904";
};

View File

@ -1,8 +1,7 @@
{ stdenv, fetchurl, lib, libX11, libXext, alsa-lib, freetype, brand, type, version, homepage, url, sha256, ... }:
stdenv.mkDerivation rec {
inherit type;
baseName = "${type}-Edit";
name = "${lib.toLower baseName}-${version}";
pname = "${lib.toLower type}-edit";
inherit version;
src = fetchurl {
inherit url;
@ -15,7 +14,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cp ${baseName} $out/bin
cp ${pname} $out/bin
'';
preFixup = let
# we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
$out/bin/${baseName}
$out/bin/${pname}
'';
meta = with lib; {

View File

@ -10,13 +10,13 @@
}:
stdenv.mkDerivation rec {
name = "qmidiarp";
pname = "qmidiarp";
version = "0.6.5";
src = fetchgit {
url = "https://git.code.sf.net/p/qmidiarp/code";
sha256 = "1g2143gzfbihqr2zi3k2v1yn1x3mwfbb2khmcd4m4cq3hcwhhlx9";
rev = "qmidiarp-0.6.5";
rev = "qmidiarp-${version}";
};
nativeBuildInputs = [

View File

@ -1,7 +1,6 @@
{ lib, stdenv, fetchFromGitHub, lv2, pkg-config, libGLU, libGL, cairo, pango, libjack2 }:
let
name = "sisco.lv2-${version}";
version = "0.7.0";
robtkVersion = "80a2585253a861c81f0bfb7e4579c75f5c73af89";
@ -22,7 +21,8 @@ let
};
in
stdenv.mkDerivation rec {
inherit name;
pname = "sisco.lv2";
inherit version;
srcs = [ src robtkSrc ];
sourceRoot = src.name;

View File

@ -45,7 +45,7 @@ let runtimeDeps = []
in
mkDerivation rec {
name = "soundkonverter";
pname = "soundkonverter";
version = "3.0.1";
src = fetchFromGitHub {
owner = "dfaust";

View File

@ -6,7 +6,7 @@
with lib;
stdenv.mkDerivation rec {
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-unlimited-" + version;
pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited";
version = "1.9.2.0";
src = fetchFromGitHub {

View File

@ -6,7 +6,7 @@
with lib;
stdenv.mkDerivation rec {
name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
pname = "dogecoin" + optionalString (!withGui) "d";
version = "1.14.5";
src = fetchFromGitHub {

View File

@ -11,8 +11,7 @@
with lib;
mkDerivation rec {
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
pname = "litecoin" + optionalString (!withGui) "d";
version = "0.18.1";
src = fetchFromGitHub {

View File

@ -3,8 +3,8 @@
with lib;
stdenv.mkDerivation rec {
pname = "namecoin" + optionalString (!withGui) "d";
version = "nc22.0";
name = "namecoin" + toString (optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = "namecoin";

View File

@ -5,7 +5,7 @@
}:
{ meta
, name
, pname
, product
, productShort ? product
, src
@ -17,7 +17,7 @@ let
loname = lib.toLower productShort;
in
stdenvNoCC.mkDerivation {
inherit meta src version;
inherit pname meta src version;
desktopName = product;
installPhase = ''
runHook preInstall
@ -32,6 +32,5 @@ in
runHook postInstall
'';
nativeBuildInputs = [ undmg ];
pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name));
sourceRoot = ".";
}

View File

@ -24,9 +24,9 @@ let
# Sorted alphabetically
buildClion = { name, version, src, license, description, wmClass, ... }:
buildClion = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "CLion";
meta = with lib; {
homepage = "https://www.jetbrains.com/clion/";
@ -62,9 +62,9 @@ let
'';
});
buildDataGrip = { name, version, src, license, description, wmClass, ... }:
buildDataGrip = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "DataGrip";
meta = with lib; {
homepage = "https://www.jetbrains.com/datagrip/";
@ -78,9 +78,9 @@ let
};
});
buildGoland = { name, version, src, license, description, wmClass, ... }:
buildGoland = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "Goland";
meta = with lib; {
homepage = "https://www.jetbrains.com/go/";
@ -106,9 +106,9 @@ let
'';
});
buildIdea = { name, version, src, license, description, wmClass, product, ... }:
buildIdea = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "IDEA";
extraLdPath = [ zlib ];
extraWrapperArgs = [
@ -129,9 +129,9 @@ let
};
});
buildMps = { name, version, src, license, description, wmClass, product, ... }:
buildMps = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct rec {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "MPS";
meta = with lib; {
homepage = "https://www.jetbrains.com/mps/";
@ -146,9 +146,9 @@ let
};
});
buildPhpStorm = { name, version, src, license, description, wmClass, ... }:
buildPhpStorm = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "PhpStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/phpstorm/";
@ -162,9 +162,9 @@ let
};
});
buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
buildPycharm = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "PyCharm";
meta = with lib; {
homepage = "https://www.jetbrains.com/pycharm/";
@ -186,9 +186,9 @@ let
};
});
buildRider = { name, version, src, license, description, wmClass, ... }:
buildRider = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "Rider";
meta = with lib; {
homepage = "https://www.jetbrains.com/rider/";
@ -211,9 +211,9 @@ let
'');
});
buildRubyMine = { name, version, src, license, description, wmClass, ... }:
buildRubyMine = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "RubyMine";
meta = with lib; {
homepage = "https://www.jetbrains.com/ruby/";
@ -223,9 +223,9 @@ let
};
});
buildWebStorm = { name, version, src, license, description, wmClass, ... }:
buildWebStorm = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "WebStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/webstorm/";
@ -251,7 +251,7 @@ in
# Sorted alphabetically
clion = buildClion rec {
name = "clion-${version}";
pname = "clion";
version = products.clion.version;
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = lib.licenses.unfree;
@ -264,7 +264,7 @@ in
};
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
pname = "datagrip";
version = products.datagrip.version;
description = "Your Swiss Army Knife for Databases and SQL";
license = lib.licenses.unfree;
@ -277,7 +277,7 @@ in
};
goland = buildGoland rec {
name = "goland-${version}";
pname = "goland";
version = products.goland.version;
description = "Up and Coming Go IDE";
license = lib.licenses.unfree;
@ -290,7 +290,7 @@ in
};
idea-community = buildIdea rec {
name = "idea-community-${version}";
pname = "idea-community";
product = "IntelliJ IDEA CE";
version = products.idea-community.version;
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
@ -304,7 +304,7 @@ in
};
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
pname = "idea-ultimate";
product = "IntelliJ IDEA";
version = products.idea-ultimate.version;
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
@ -318,7 +318,7 @@ in
};
mps = buildMps rec {
name = "mps-${version}";
pname = "mps";
product = "MPS ${products.mps.version-major-minor}";
version = products.mps.version;
description = "Create your own domain-specific language";
@ -332,7 +332,7 @@ in
};
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
pname = "phpstorm";
version = products.phpstorm.version;
description = "Professional IDE for Web and PHP developers";
license = lib.licenses.unfree;
@ -345,7 +345,7 @@ in
};
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
pname = "pycharm-community";
product = "PyCharm CE";
version = products.pycharm-community.version;
description = "PyCharm Community Edition";
@ -359,7 +359,7 @@ in
};
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
pname = "pycharm-professional";
product = "PyCharm";
version = products.pycharm-professional.version;
description = "PyCharm Professional Edition";
@ -373,7 +373,7 @@ in
};
rider = buildRider rec {
name = "rider-${version}";
pname = "rider";
version = products.rider.version;
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
license = lib.licenses.unfree;
@ -386,7 +386,7 @@ in
};
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
pname = "ruby-mine";
version = products.ruby-mine.version;
description = "The Most Intelligent Ruby and Rails IDE";
license = lib.licenses.unfree;
@ -399,7 +399,7 @@ in
};
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
pname = "webstorm";
version = products.webstorm.version;
description = "Professional IDE for Web and JavaScript development";
license = lib.licenses.unfree;

View File

@ -3,30 +3,29 @@
, vmopts ? null
}:
{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
{ pname, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
with lib;
let loName = toLower productShort;
hiName = toUpper productShort;
mainProgram = concatStringsSep "-" (init (splitString "-" name));
vmoptsName = loName
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
+ ".vmoptions";
in
with stdenv; lib.makeOverridable mkDerivation (rec {
inherit name src;
meta = args.meta // { inherit mainProgram; };
inherit pname version src;
meta = args.meta // { mainProgram = pname; };
desktopItem = makeDesktopItem {
name = mainProgram;
exec = mainProgram;
name = pname;
exec = pname;
comment = lib.replaceChars ["\n"] [" "] meta.longDescription;
desktopName = product;
genericName = meta.description;
categories = [ "Development" ];
icon = mainProgram;
icon = pname;
startupWMClass = wmClass;
};
@ -62,16 +61,16 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}}
cp -a . $out/$name
ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${mainProgram}.png
mv bin/fsnotifier* $out/libexec/${name}/.
mkdir -p $out/{bin,$pname,share/pixmaps,libexec/${pname}}
cp -a . $out/$pname
ln -s $out/$pname/bin/${loName}.png $out/share/pixmaps/${pname}.png
mv bin/fsnotifier* $out/libexec/${pname}/.
jdk=${jdk.home}
item=${desktopItem}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
--prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
makeWrapper "$out/$pname/bin/${loName}.sh" "$out/bin/${pname}" \
--prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret e2fsprogs

View File

@ -32,7 +32,8 @@ rec {
'';
sizedLogo = size: stdenv.mkDerivation {
name = ''octave-logo-${octave.version}-${size}x${size}.png'';
pname = "octave-logo-${size}x${size}.png";
inherit (octave) version;
src = octave.src;

View File

@ -2,7 +2,7 @@
qmake, qtbase, qtxmlpatterns, qtsvg, qtscxml, qtquick1, libGLU }:
stdenv.mkDerivation rec {
name = "qxmledit-${version}" ;
pname = "qxmledit" ;
version = "0.9.15" ;
src = fetchFromGitHub ( lib.importJSON ./qxmledit.json ) ;
nativeBuildInputs = [ qmake ] ;

View File

@ -1,5 +1,5 @@
{ stdenv, lib, pkgArches, callPackage, makeSetupHook,
name, version, src, mingwGccs, monos, geckos, platforms,
pname, version, src, mingwGccs, monos, geckos, platforms,
bison, flex, fontforge, makeWrapper, pkg-config,
autoconf, hexdump, perl, nixosTests,
supportFlags,
@ -13,7 +13,7 @@ with import ./util.nix { inherit lib; };
let
patches' = patches;
prevName = name;
prevName = pname;
prevPlatforms = platforms;
prevConfigFlags = configureFlags;
setupHookDarwin = makeSetupHook {
@ -42,9 +42,9 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
make loader/wine64-preloader NIX_LDFLAGS="" NIX_LDFLAGS_${stdenv.cc.suffixSalt}=""
'';
}) // rec {
inherit src;
inherit version src;
name = if supportFlags.waylandSupport then "${prevName}-wayland" else prevName;
pname = prevName + lib.optionalString supportFlags.waylandSupport "wayland";
# Fixes "Compiler cannot create executables" building wineWow with mingwSupport
strictDeps = true;

View File

@ -9,7 +9,7 @@ let
vkd3d_i686 = pkgsi686Linux.callPackage ./vkd3d.nix { inherit moltenvk; };
in with src; {
wine32 = pkgsi686Linux.callPackage ./base.nix {
name = "wine-${version}";
pname = "wine";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgsi686Linux ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d_i686 ];
@ -19,7 +19,7 @@ in with src; {
platforms = [ "i686-linux" "x86_64-linux" ];
};
wine64 = callPackage ./base.nix {
name = "wine64-${version}";
pname = "wine64";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgs ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d ];
@ -30,7 +30,7 @@ in with src; {
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
wineWow = callPackage ./base.nix {
name = "wine-wow-${version}";
pname = "wine-wow";
inherit src version supportFlags patches moltenvk;
stdenv = stdenv_32bit;
pkgArches = [ pkgs pkgsi686Linux ];

View File

@ -5,7 +5,7 @@
}:
stdenv.mkDerivation rec {
name = "grass";
pname = "grass";
version = "7.8.6";
src = with lib; fetchFromGitHub {

View File

@ -9,8 +9,8 @@
applytransforms = callPackage ./extensions/applytransforms { };
hexmap = stdenv.mkDerivation {
name = "hexmap";
version = "2020-06-06";
pname = "hexmap";
version = "unstable-2020-06-06";
src = fetchFromGitHub {
owner = "lifelike";

View File

@ -4,14 +4,12 @@
}:
stdenv.mkDerivation rec {
p_name = "mtPaint";
ver_maj = "3.50";
ver_min = "01";
name = "${p_name}-${ver_maj}.${ver_min}";
pname = "mtPaint";
version = "3.50.01";
src = fetchFromGitHub {
owner = "wjaguar";
repo = p_name;
repo = "mtPaint";
rev = "a4675ff5cd9fcd57d291444cb9f332b48f11243f";
sha256 = "04wqxz8i655gz5rnz90cksy8v6m2jhcn1j8rzhqpp5xhawlmq24y";
};

View File

@ -114,7 +114,7 @@ let
};
base = rec {
name = "${packageName}-unwrapped-${version}";
pname = "${packageName}-unwrapped";
inherit (upstream-info) version;
inherit packageName buildType buildPath;

View File

@ -157,8 +157,8 @@ let
else browser;
in stdenv.mkDerivation {
name = lib.optionalString ungoogled "ungoogled-"
+ "chromium${suffix}-${version}";
pname = lib.optionalString ungoogled "ungoogled-"
+ "chromium${suffix}";
inherit version;
nativeBuildInputs = [

View File

@ -50,7 +50,8 @@ let
;
pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs);
name = (lib.appendToName "wrapped" unwrapped).name;
pname = unwrapped.pname + "-wrapped";
inherit (unwrapped) version;
makeWrapperArgs = builtins.concatStringsSep " " ([
]
# Emulating wrapGAppsHook & wrapQtAppsHook working together
@ -59,7 +60,7 @@ let
|| (unwrapped.hasFeature "gr-qtgui")
) [
"--prefix" "XDG_DATA_DIRS" ":" "$out/share"
"--prefix" "XDG_DATA_DIRS" ":" "$out/share/gsettings-schemas/${name}"
"--prefix" "XDG_DATA_DIRS" ":" "$out/share/gsettings-schemas/${pname}"
"--prefix" "XDG_DATA_DIRS" ":" "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
"--prefix" "XDG_DATA_DIRS" ":" "${hicolor-icon-theme}/share"
# Needs to run `gsettings` on startup, see:
@ -135,7 +136,7 @@ let
};
self = if doWrap then
stdenv.mkDerivation {
inherit name passthru;
inherit pname version passthru;
buildInputs = [
makeWrapper
xorg.lndir

View File

@ -12,7 +12,7 @@ let configAwkScript = runCommand "why3-conf.awk" { inherit provers; }
'';
in
stdenv.mkDerivation {
name = "${why3.name}-with-provers";
pname = "${why3.pname}-with-provers";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ why3 ] ++ provers;