aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps/mediagoblin
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/webapps/mediagoblin')
-rw-r--r--pkgs/webapps/mediagoblin/default.nix35
1 files changed, 18 insertions, 17 deletions
diff --git a/pkgs/webapps/mediagoblin/default.nix b/pkgs/webapps/mediagoblin/default.nix
index c20bcb4..d348ce1 100644
--- a/pkgs/webapps/mediagoblin/default.nix
+++ b/pkgs/webapps/mediagoblin/default.nix
@@ -1,4 +1,4 @@
1{ makeWrapper, stdenv, writeScript, fetchurl, buildBowerComponents, mylibs, which, python36, gst_all_1, automake, autoconf, nodejs, nodePackages }: 1{ makeWrapper, stdenv, writeScript, fetchurl, buildBowerComponents, mylibs, which, python36, gst_all_1, automake, autoconf, nodejs, nodePackages, lib, callPackage }:
2let 2let
3 overridePython = let 3 overridePython = let
4 packageOverrides = self: super: { 4 packageOverrides = self: super: {
@@ -113,18 +113,22 @@ let
113 generated = ./bower-packages.nix; 113 generated = ./bower-packages.nix;
114 src = (mylibs.fetchedGit ./mediagoblin.json).src; 114 src = (mylibs.fetchedGit ./mediagoblin.json).src;
115 }; 115 };
116 withPlugins = plugins: package.overrideAttrs(old: { 116 pluginNames = [ "basicsearch" ];
117 name = "${old.name}-with-plugins"; 117 allPlugins = lib.attrsets.genAttrs pluginNames
118 postBuild = old.postBuild + ( 118 (name: callPackage (./plugins + "/${name}") {});
119 builtins.concatStringsSep "\n" ( 119 toPassthru = pkg: {
120 map (value: "ln -s ${value} mediagoblin/plugins/${value.pluginName}") plugins 120 inherit allPlugins;
121 ) 121 withPlugins = withPlugins pkg;
122 ); 122 };
123 passthru = old.passthru // { 123 withPlugins = pkg: toPlugins:
124 inherit plugins; 124 let
125 withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins); 125 plugins = toPlugins allPlugins;
126 }; 126 toBuildPlugin = n: "ln -s ${n} mediagoblin/plugins/${n.pluginName}";
127 }); 127 newMediagoblin = pkg.overrideAttrs(old: {
128 postBuild = old.postBuild + "\n" + builtins.concatStringsSep "\n" (map toBuildPlugin plugins);
129 passthru = toPassthru newMediagoblin;
130 });
131 in newMediagoblin;
128 package = stdenv.mkDerivation (mylibs.fetchedGit ./mediagoblin.json // rec { 132 package = stdenv.mkDerivation (mylibs.fetchedGit ./mediagoblin.json // rec {
129 preConfigure = '' 133 preConfigure = ''
130 # ./bootstrap.sh 134 # ./bootstrap.sh
@@ -173,9 +177,6 @@ let
173 ''; 177 '';
174 buildInputs = [ makeWrapper automake autoconf which nodePackages.bower nodejs python ]; 178 buildInputs = [ makeWrapper automake autoconf which nodePackages.bower nodejs python ];
175 propagatedBuildInputs = with gst_all_1; [ python gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly gstreamer ]; 179 propagatedBuildInputs = with gst_all_1; [ python gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly gstreamer ];
176 passthru = { 180 passthru = toPassthru package;
177 plugins = [];
178 inherit withPlugins;
179 };
180 }); 181 });
181in package 182in package