Verified Commit 35ddc9ac authored by doshitan's avatar doshitan

Move all custom packaging to overlay

parent d724c31a
......@@ -7,80 +7,77 @@
let
overlay = newPkgs: oldPkgs: {
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 {
url = "https://github.com/EbenSorkin/Merriweather/archive/a792c77e48a672b821c0a4f98900ed39b6b0b3e9.tar.gz";
sha256 = "1zy25apa5dvk4rzk29iyahxqqcbm988vn3ipz4csdlwkabsjmi9s";
};
merriweather = oldPkgs.stdenv.mkDerivation rec {
name = "merriweather-${version}";
version = "2.003";
phases = [ "unpackPhase" "installPhase" ];
src = oldPkgs.fetchurl {
url = "https://github.com/EbenSorkin/Merriweather/archive/a792c77e48a672b821c0a4f98900ed39b6b0b3e9.tar.gz";
sha256 = "1zy25apa5dvk4rzk29iyahxqqcbm988vn3ipz4csdlwkabsjmi9s";
};
installPhase = ''
mkdir $out
mv fonts/* $out/
'';
};
phases = [ "unpackPhase" "installPhase" ];
lib = oldPkgs.lib // (with oldPkgs.lib; rec {
applyFuncs = funcs: drv: lib.foldl' (drv': f: f drv') drv funcs;
installPhase = ''
mkdir $out
mv fonts/* $out/
'';
};
contentSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
(type == "symlink")
|| (type == "directory" && (baseName == "elm-stuff"))
);
lib = oldPkgs.lib // (with oldPkgs.lib; rec {
applyFuncs = funcs: drv: lib.foldl' (drv': f: f drv') drv funcs;
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 ! (
(type == "directory" && (baseName == "dist"))
|| (type == "directory" && (baseName == "dist-newstyle"))
);
contentCleanSource = src: cleanSource (cleanSourceWith { filter = contentSourceFilter; inherit src; });
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 =
if compiler == "default"
then oldPkgs.haskellPackages
else oldPkgs.haskell.packages."${compiler}";
haskellCleanSource = src: cleanSource (cleanSourceWith { filter = haskellSourceFilter; inherit src; });
});
modifiedHaskellPackages = origHaskellPackages.override {
overrides = newHaskellPkgs: oldHaskellPkgs: {
mkDerivation = args: oldHaskellPkgs.mkDerivation (args // {
enableLibraryProfiling = withProfiling;
});
origHaskellPackages =
if compiler == "default"
then oldPkgs.haskellPackages
else oldPkgs.haskell.packages."${compiler}";
hakyll = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hakyll;
hasktags = oldPkgs.haskell.lib.dontCheck oldHaskellPkgs.hasktags;
clay = with oldPkgs.haskell.lib; dontCheck (unmarkBroken oldHaskellPkgs.clay);
};
};
modifiedHaskellPackages = newPkgs.origHaskellPackages.override {
overrides = newHaskellPkgs: oldHaskellPkgs: {
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 {
pkgs = oldPkgs;
inherit nodejs;
};
nodejs = oldPkgs.nodejs-10_x;
contentNodeRuntimeEnv = oldPkgs.buildEnv {
name = "content-runtime";
paths = with nodePackages; [
lunr
];
};
nodePackages = import ./node {
pkgs = oldPkgs;
nodejs = newPkgs.nodejs;
};
};
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