diff --git a/pkgs/applications/window-managers/stumpwm/default.nix b/pkgs/applications/window-managers/stumpwm/default.nix new file mode 100644 index 000000000000..1185339bbb9f --- /dev/null +++ b/pkgs/applications/window-managers/stumpwm/default.nix @@ -0,0 +1,42 @@ +args : +let + lib = args.lib; + fetchurl = args.fetchurl; + noDepEntry = args.noDepEntry; + FullDepEntry = args.FullDepEntry; + + buildInputs = lib.attrVals ["clisp" "texinfo"] args; + version = lib.getAttr ["version"] "0.9.4.1" args; + + pkgName = "stumpwm"; +in +rec { + src = fetchurl { + url = "http://download.savannah.gnu.org/releases/stumpwm/${pkgName}-${version}.tgz"; + sha256 = "0wnkv3bgaj2bflh795ph6wiyhxzbhrif20vb40j6hjxxs9kywzqj"; + }; + + inherit buildInputs; + configureFlags = ["--with-lisp=clisp"]; + envVars = noDepEntry ('' + export HOME="$NIX_BUILD_TOP"; + ''); + + installation = FullDepEntry ('' + ensureDir $out/bin + ensureDir $out/share/stumpwm/doc + ensureDir $out/share/info + + cp stumpwm $out/bin + cp sample-stumpwmrc.lisp $out/share/stumpwm/doc + cp stumpwm.info $out/share/info + '') ["minInit" "defEnsureDir" "addInputs" "doMake"]; + + /* doConfigure should be specified separately */ + phaseNames = ["envVars" "doConfigure" "doMake" "installation"]; + + name = "${pkgName}-" + version; + meta = { + description = "Common Lisp-based ratpoison-like window manager."; + }; +} diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 7a89725c2121..8b23a5c8c058 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -494,6 +494,9 @@ rec { mergeAttrs = fold ( x : y : x // y) {}; + attrVals = nameList : attrSet : + map (x: builtins.getAttr x attrSet) nameList; + # Using f = a : b = b the result is similar to // # merge attributes with custom function handling the case that the attribute # exists in both sets diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 534348667fc9..fe916a8fa993 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6681,6 +6681,10 @@ let pkgs = rec { inherit fetchurl stdenv python git; }; + stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) { + inherit clisp texinfo; + } null; + subversion = subversion14; subversion14 = import ../applications/version-management/subversion-1.4.x {