Commit 147760c1 authored by Herwig Hochleitner's avatar Herwig Hochleitner
Browse files

cdemu: avoid double-wrapper and nested callPackage

parent 0a3bfb43
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
{ 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 {
stdenv.mkDerivation {

  inherit (callPackage ./common-drv-attrs.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
  }) 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
Original line number Diff line number Diff line
{ callPackage, python3Packages, intltool, wrapGAppsNoGuiHook }:
callPackage ./base.nix {
{ 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=";
  nativeBuildInputs = [ intltool wrapGAppsNoGuiHook ];
  }) 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"
  '';

}
+6 −9
Original line number Diff line number Diff line
{ 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
Original line number Diff line number Diff line
{ callPackage, glib, libao, intltool, libmirage, coreutils }:
callPackage ./base.nix {
{ 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=";
  nativeBuildInputs = [ intltool ];
  }) 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
Original line number Diff line number Diff line
{ callPackage, makeWrapper, gobject-introspection, cmake, wrapGAppsHook3
, python3Packages, gtk3, glib, libnotify, intltool, gnome, gdk-pixbuf, librsvg }:
callPackage ./base.nix {
{ 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=";
  buildInputs = [ python3Packages.pygobject3 gtk3 glib libnotify gnome.adwaita-icon-theme gdk-pixbuf librsvg ];
  nativeBuildInputs = [ cmake wrapGAppsHook3 intltool ];
  }) 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"
  '';

}
Loading