cdemu: avoid double-wrapper and nested callPackage

This commit is contained in:
Herwig Hochleitner
2024-05-15 13:27:45 +02:00
parent 0a3bfb4375
commit 147760c141
6 changed files with 74 additions and 48 deletions
+14 -7
View File
@@ -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"
'';
}
+14 -6
View File
@@ -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"
'';
}
@@ -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)
}
+11 -7
View File
@@ -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 \
+16 -8
View File
@@ -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"
'';
}
+13 -11
View File
@@ -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 ];
}