diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2024-05-15 12:34:31 +0200 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2024-05-15 13:27:45 +0200 |
commit | 147760c141c4eaf02ab42b783d35de1032c3cdbe (patch) | |
tree | 0626b0555bdc51817516ccfdcf4ea18653ba4c3c | |
parent | 0a3bfb437537b53e848fe9c4e985b2821215f0a7 (diff) |
cdemu: avoid double-wrapper and nested callPackage
-rw-r--r-- | pkgs/applications/emulators/cdemu/analyzer.nix | 21 | ||||
-rw-r--r-- | pkgs/applications/emulators/cdemu/client.nix | 20 | ||||
-rw-r--r-- | pkgs/applications/emulators/cdemu/common-drv-attrs.nix (renamed from pkgs/applications/emulators/cdemu/base.nix) | 15 | ||||
-rw-r--r-- | pkgs/applications/emulators/cdemu/daemon.nix | 18 | ||||
-rw-r--r-- | pkgs/applications/emulators/cdemu/gui.nix | 24 | ||||
-rw-r--r-- | pkgs/applications/emulators/cdemu/libmirage.nix | 24 |
6 files changed, 74 insertions, 48 deletions
diff --git a/pkgs/applications/emulators/cdemu/analyzer.nix b/pkgs/applications/emulators/cdemu/analyzer.nix index 62288ddc22a4f..9db86e56d0827 100644 --- a/pkgs/applications/emulators/cdemu/analyzer.nix +++ b/pkgs/applications/emulators/cdemu/analyzer.nix @@ -1,14 +1,21 @@ -{ callPackage, makeWrapper, gobject-introspection, cmake, wrapGAppsHook3 +{ stdenv, cmake, pkg-config, callPackage, makeWrapper, gobject-introspection, wrapGAppsHook3 , python3Packages, gtk3, glib, libxml2, gnuplot, gnome, gdk-pixbuf, librsvg, intltool, libmirage }: -callPackage ./base.nix { - version = "3.2.6"; - pname = "image-analyzer"; - hash = "sha256-7I8RUgd+k3cEzskJGbziv1f0/eo5QQXn62wGh/Y5ozc="; - buildInputs = [ glib gtk3 libxml2 gnuplot libmirage gnome.adwaita-icon-theme gdk-pixbuf librsvg +stdenv.mkDerivation { + + inherit (callPackage ./common-drv-attrs.nix { + version = "3.2.6"; + pname = "image-analyzer"; + hash = "sha256-7I8RUgd+k3cEzskJGbziv1f0/eo5QQXn62wGh/Y5ozc="; + }) pname version src meta; + + buildInputs = [ libxml2 gnuplot libmirage gnome.adwaita-icon-theme gdk-pixbuf librsvg python3Packages.pygobject3 python3Packages.matplotlib ]; - nativeBuildInputs = [ gobject-introspection cmake wrapGAppsHook3 intltool ]; + nativeBuildInputs = [ cmake pkg-config wrapGAppsHook3 intltool ]; + + dontWrapGApps = true; postFixup = '' wrapProgram $out/bin/image-analyzer \ + ''${gappsWrapperArgs[@]} \ --set PYTHONPATH "$PYTHONPATH" ''; } diff --git a/pkgs/applications/emulators/cdemu/client.nix b/pkgs/applications/emulators/cdemu/client.nix index 9b703335fd551..1c0e662f5accd 100644 --- a/pkgs/applications/emulators/cdemu/client.nix +++ b/pkgs/applications/emulators/cdemu/client.nix @@ -1,12 +1,20 @@ -{ callPackage, python3Packages, intltool, wrapGAppsNoGuiHook }: -callPackage ./base.nix { - version = "3.2.5"; - pname = "cdemu-client"; - hash = "sha256-py2F61v8vO0BCM18GCflAiD48deZjbMM6wqoCDZsOd8="; - nativeBuildInputs = [ intltool wrapGAppsNoGuiHook ]; +{ stdenv, callPackage, python3Packages, cmake, pkg-config, intltool, wrapGAppsNoGuiHook }: +stdenv.mkDerivation { + + inherit (callPackage ./common-drv-attrs.nix { + version = "3.2.5"; + pname = "cdemu-client"; + hash = "sha256-py2F61v8vO0BCM18GCflAiD48deZjbMM6wqoCDZsOd8="; + }) pname version src meta; + + nativeBuildInputs = [ cmake pkg-config intltool wrapGAppsNoGuiHook ]; buildInputs = with python3Packages; [ dbus-python pygobject3 ]; + + dontWrapGApps = true; postFixup = '' wrapProgram $out/bin/cdemu \ + ''${gappsWrapperArgs[@]} \ --set PYTHONPATH "$PYTHONPATH" ''; + } diff --git a/pkgs/applications/emulators/cdemu/base.nix b/pkgs/applications/emulators/cdemu/common-drv-attrs.nix index c48e682d963e5..9c43e358981ef 100644 --- a/pkgs/applications/emulators/cdemu/base.nix +++ b/pkgs/applications/emulators/cdemu/common-drv-attrs.nix @@ -1,16 +1,13 @@ -{ lib, stdenv, fetchurl, cmake, pkg-config -, pname, version, hash, buildInputs -, nativeBuildInputs ? [ ] -, postFixup ? "" -, extraDrvParams ? { } +{ lib, fetchurl +, pname, version, hash }: -stdenv.mkDerivation ( { - inherit pname version buildInputs postFixup; + +{ + inherit pname version; src = fetchurl { url = "mirror://sourceforge/cdemu/${pname}-${version}.tar.xz"; inherit hash; }; - nativeBuildInputs = nativeBuildInputs ++ [ pkg-config cmake ]; meta = with lib; { description = "A suite of tools for emulating optical drives and discs"; longDescription = '' @@ -29,4 +26,4 @@ stdenv.mkDerivation ( { platforms = platforms.linux; maintainers = with lib.maintainers; [ bendlas ]; }; -} // extraDrvParams) +} diff --git a/pkgs/applications/emulators/cdemu/daemon.nix b/pkgs/applications/emulators/cdemu/daemon.nix index 843504d330690..5382efbff2376 100644 --- a/pkgs/applications/emulators/cdemu/daemon.nix +++ b/pkgs/applications/emulators/cdemu/daemon.nix @@ -1,11 +1,15 @@ -{ callPackage, glib, libao, intltool, libmirage, coreutils }: -callPackage ./base.nix { - version = "3.2.6"; - pname = "cdemu-daemon"; - hash = "sha256-puQE4+91xhRuNjVPZYgN/WO0uO8fVAOdxQWOGQ+FfY8="; - nativeBuildInputs = [ intltool ]; +{ stdenv, callPackage, cmake, pkg-config, glib, libao, intltool, libmirage, coreutils }: +stdenv.mkDerivation { + + inherit (callPackage ./common-drv-attrs.nix { + version = "3.2.6"; + pname = "cdemu-daemon"; + hash = "sha256-puQE4+91xhRuNjVPZYgN/WO0uO8fVAOdxQWOGQ+FfY8="; + }) pname version src meta; + + nativeBuildInputs = [ cmake pkg-config intltool ]; buildInputs = [ glib libao libmirage ]; - extraDrvParams.postInstall = '' + postInstall = '' mkdir -p $out/share/dbus-1/services cp -R ../service-example $out/share/cdemu substitute \ diff --git a/pkgs/applications/emulators/cdemu/gui.nix b/pkgs/applications/emulators/cdemu/gui.nix index a525783fec32e..b4a886471bb94 100644 --- a/pkgs/applications/emulators/cdemu/gui.nix +++ b/pkgs/applications/emulators/cdemu/gui.nix @@ -1,13 +1,21 @@ -{ callPackage, makeWrapper, gobject-introspection, cmake, wrapGAppsHook3 -, python3Packages, gtk3, glib, libnotify, intltool, gnome, gdk-pixbuf, librsvg }: -callPackage ./base.nix { - version = "3.2.6"; - pname = "gcdemu"; - hash = "sha256-w4vzKoSotL5Cjfr4Cu4YhNSWXJqS+n/vySrwvbhR1zA="; - buildInputs = [ python3Packages.pygobject3 gtk3 glib libnotify gnome.adwaita-icon-theme gdk-pixbuf librsvg ]; - nativeBuildInputs = [ cmake wrapGAppsHook3 intltool ]; +{ stdenv, callPackage, cmake, pkg-config, wrapGAppsHook3 +, python3Packages, libnotify, intltool, gnome, gdk-pixbuf, librsvg }: +stdenv.mkDerivation { + + inherit (callPackage ./common-drv-attrs.nix { + version = "3.2.6"; + pname = "gcdemu"; + hash = "sha256-w4vzKoSotL5Cjfr4Cu4YhNSWXJqS+n/vySrwvbhR1zA="; + }) pname version src meta; + + nativeBuildInputs = [ cmake pkg-config wrapGAppsHook3 intltool ]; + buildInputs = [ python3Packages.pygobject3 libnotify gnome.adwaita-icon-theme gdk-pixbuf librsvg ]; + + dontWrapGApps = true; postFixup = '' wrapProgram $out/bin/gcdemu \ + ''${gappsWrapperArgs[@]} \ --set PYTHONPATH "$PYTHONPATH" ''; + } diff --git a/pkgs/applications/emulators/cdemu/libmirage.nix b/pkgs/applications/emulators/cdemu/libmirage.nix index 379f1ea5031f5..0bbd9e1dfbf31 100644 --- a/pkgs/applications/emulators/cdemu/libmirage.nix +++ b/pkgs/applications/emulators/cdemu/libmirage.nix @@ -1,16 +1,18 @@ -{ callPackage, gobject-introspection, cmake, pkg-config +{ stdenv, callPackage, cmake, pkg-config , glib, libsndfile, zlib, bzip2, xz, libsamplerate, intltool , pcre, util-linux, libselinux, libsepol }: -callPackage ./base.nix { - version = "3.2.7"; - pname = "libmirage"; - hash = "sha256-+okkgNeVS8yoKSrQDy4It7PiPlTSiOsUoFxQ1FS9s9M="; +stdenv.mkDerivation { + + inherit (callPackage ./common-drv-attrs.nix { + version = "3.2.7"; + pname = "libmirage"; + hash = "sha256-+okkgNeVS8yoKSrQDy4It7PiPlTSiOsUoFxQ1FS9s9M="; + }) pname version src meta; + + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; buildInputs = [ glib libsndfile zlib bzip2 xz libsamplerate ]; - extraDrvParams = { - PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; - PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; - nativeBuildInputs = [ cmake gobject-introspection pkg-config intltool ]; - propagatedBuildInputs = [ pcre util-linux libselinux libsepol ]; - }; + nativeBuildInputs = [ cmake pkg-config intltool ]; + propagatedBuildInputs = [ pcre util-linux libselinux libsepol ]; } |