diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix new file mode 100644 index 00000000000..142baf9dba3 --- /dev/null +++ b/pkgs/applications/audio/snd/default.nix @@ -0,0 +1,37 @@ +args : with args; + with builderDefs { + src = + fetchurl { + url = ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-9.4.tar.gz; + sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm"; + }; + + buildInputs = [gtk glib pkgconfig libXpm gmp gettext] + ++ (lib.optional (args ? ruby) args.ruby) + ++ (lib.optional (args ? mesa) args.mesa) + ++ (lib.optional (args ? guile) args.guile) + ++ (lib.optional (args ? libtool) args.libtool) + ++ (lib.optional (args ? sndlib) args.sndlib) + ; + configureFlags = ["--with-gtk" "--with-xpm"] + ++ (lib.optional (args ? ruby) "--with-ruby" ) + ++ (lib.optional (args ? mesa) "--with-gl" ) + ++ (lib.optional (args ? guile) "--with-guile") + ++ (lib.optional (args ? sndlib) "--with-midi" ) + ; + } null; /* null is a terminator for sumArgs */ + with stringsWithDeps; + let preBuild = FullDepEntry (" + cp config.log /tmp/snd-config.log + ") [minInit doUnpack]; +in +stdenv.mkDerivation rec { + name = "Snd-9.4"; + builder = writeScript (name + "-builder") + (textClosure [doConfigure preBuild doMakeInstall doForceShare]); + meta = { + description = " + Snd sound editor. +"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9c2ae3b667..2043ffc4383 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3829,6 +3829,17 @@ rec { inherit (xlibs) libXmu; }; + sndFun = lib.sumArgs (import ../applications/audio/snd) { + inherit fetchurl stdenv builderDefs stringsWithDeps lib; + inherit pkgconfig gmp gettext; + inherit (xlibs) libXpm; + inherit (gtkLibs) gtk glib; + }; + + snd = sndFun { + inherit guile mesa libtool; + } null; + # commented out because it's using the new configuration style proposal which is unstable /* sox = import ../applications/misc/audio/sox { diff --git a/pkgs/top-level/template-composing-builder.nix b/pkgs/top-level/template-composing-builder.nix new file mode 100644 index 00000000000..a652da02445 --- /dev/null +++ b/pkgs/top-level/template-composing-builder.nix @@ -0,0 +1,18 @@ +args : with args; + with builderDefs { + src = /* put a fetchurl here */ + + buildInputs = []; + configureFlags = []; + } null; /* null is a terminator for sumArgs */ + with stringsWithDeps; +stdenv.mkDerivation rec { + name = "${abort "Specify name"}"; + builder = writeScript (name + "-builder") + (textClosure [(abort "Specify phases - defined here or in builderDefs")]); + meta = { + description = " + ${abort "Write a description"} +"; + }; +}