Verified Commit 35ddc9ac authored by doshitan's avatar doshitan

Move all custom packaging to overlay

parent d724c31a
...@@ -7,80 +7,77 @@ ...@@ -7,80 +7,77 @@
let let
overlay = newPkgs: oldPkgs: { overlay = newPkgs: oldPkgs: {
niv = import sources.niv {}; niv = import sources.niv {};
};
in
import sources.nixpkgs {
overlays = [ overlay ];
config = {
packageOverrides = oldPkgs: let newPkgs = oldPkgs.pkgs; in rec {
merriweather = oldPkgs.stdenv.mkDerivation rec {
name = "merriweather-${version}";
version = "2.003";
src = oldPkgs.fetchurl { merriweather = oldPkgs.stdenv.mkDerivation rec {
url = "https://github.com/EbenSorkin/Merriweather/archive/a792c77e48a672b821c0a4f98900ed39b6b0b3e9.tar.gz"; name = "merriweather-${version}";
sha256 = "1zy25apa5dvk4rzk29iyahxqqcbm988vn3ipz4csdlwkabsjmi9s"; version = "2.003";
};
phases = [ "unpackPhase" "installPhase" ]; src = oldPkgs.fetchurl {
url = "https://github.com/EbenSorkin/Merriweather/archive/a792c77e48a672b821c0a4f98900ed39b6b0b3e9.tar.gz";
sha256 = "1zy25apa5dvk4rzk29iyahxqqcbm988vn3ipz4csdlwkabsjmi9s";
};
installPhase = '' phases = [ "unpackPhase" "installPhase" ];
mkdir $out
mv fonts/* $out/
'';
};
lib = oldPkgs.lib // (with oldPkgs.lib; rec { installPhase = ''
applyFuncs = funcs: drv: lib.foldl' (drv': f: f drv') drv funcs; mkdir $out
mv fonts/* $out/
'';
};
contentSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! ( lib = oldPkgs.lib // (with oldPkgs.lib; rec {
(type == "symlink") applyFuncs = funcs: drv: lib.foldl' (drv': f: f drv') drv funcs;
|| (type == "directory" && (baseName == "elm-stuff"))
);
contentCleanSource = src: cleanSource (cleanSourceWith { filter = contentSourceFilter; inherit src; }); contentSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
(type == "symlink")
|| (type == "directory" && (baseName == "elm-stuff"))
);
haskellSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! ( contentCleanSource = src: cleanSource (cleanSourceWith { filter = contentSourceFilter; inherit src; });
(type == "directory" && (baseName == "dist"))
|| (type == "directory" && (baseName == "dist-newstyle"))
);
haskellCleanSource = src: cleanSource (cleanSourceWith { filter = haskellSourceFilter; inherit src; }); haskellSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
}); (type == "directory" && (baseName == "dist"))
|| (type == "directory" && (baseName == "dist-newstyle"))
);
origHaskellPackages = haskellCleanSource = src: cleanSource (cleanSourceWith { filter = haskellSourceFilter; inherit src; });
if compiler == "default" });
then oldPkgs.haskellPackages
else oldPkgs.haskell.packages."${compiler}";
modifiedHaskellPackages = origHaskellPackages.override { origHaskellPackages =
overrides = newHaskellPkgs: oldHaskellPkgs: { if compiler == "default"
mkDerivation = args: oldHaskellPkgs.mkDerivation (args // { then oldPkgs.haskellPackages
enableLibraryProfiling = withProfiling; else oldPkgs.haskell.packages."${compiler}";
});
hakyll = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hakyll; modifiedHaskellPackages = newPkgs.origHaskellPackages.override {
hasktags = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hasktags; overrides = newHaskellPkgs: oldHaskellPkgs: {
clay = with oldPkgs.haskell.lib; dontCheck (unmarkBroken oldHaskellPkgs.clay); mkDerivation = args: oldHaskellPkgs.mkDerivation (args // {
}; enableLibraryProfiling = withProfiling;
}; });
haskellPackages = modifiedHaskellPackages; hakyll = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hakyll;
hasktags = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hasktags;
clay = with oldPkgs.haskell.lib; dontCheck (unmarkBroken oldHaskellPkgs.clay);
};
};
nodejs = oldPkgs.nodejs-10_x; haskellPackages = newPkgs.modifiedHaskellPackages;
nodePackages = import ./node { nodejs = oldPkgs.nodejs-10_x;
pkgs = oldPkgs;
inherit nodejs;
};
contentNodeRuntimeEnv = oldPkgs.buildEnv { nodePackages = import ./node {
name = "content-runtime"; pkgs = oldPkgs;
paths = with nodePackages; [ nodejs = newPkgs.nodejs;
lunr };
];
};
}; contentNodeRuntimeEnv = oldPkgs.buildEnv {
name = "content-runtime";
paths = with newPkgs.nodePackages; [
lunr
];
}; };
};
in
import sources.nixpkgs {
overlays = [ overlay ];
config = {};
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment