2021-08-25 06:23:54 +03:00
|
|
|
{ nixpkgs
|
|
|
|
, mmdoc
|
2024-02-28 12:44:47 +03:00
|
|
|
, runtimeDeps
|
2021-08-25 06:23:54 +03:00
|
|
|
, system
|
|
|
|
, self
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2024-02-28 12:44:47 +03:00
|
|
|
runtimePkgs = import runtimeDeps { inherit system; };
|
|
|
|
|
2021-08-25 06:23:54 +03:00
|
|
|
pkgs = import nixpkgs { inherit system; config = { allowBroken = true; }; };
|
|
|
|
|
2024-02-28 12:44:47 +03:00
|
|
|
drvAttrs = attrs: with runtimePkgs; {
|
2021-08-25 06:23:54 +03:00
|
|
|
NIX = nix;
|
|
|
|
GIT = git;
|
|
|
|
JQ = jq;
|
|
|
|
TREE = tree;
|
|
|
|
GIST = gist;
|
|
|
|
# TODO: are there more coreutils paths that need locking down?
|
|
|
|
TIMEOUT = coreutils;
|
2022-04-10 22:40:10 +03:00
|
|
|
NIXPKGSREVIEW = nixpkgs-review;
|
2021-08-25 06:23:54 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
haskellPackages = pkgs.haskellPackages.override {
|
|
|
|
overrides = _: haskellPackages: {
|
|
|
|
polysemy-plugin = pkgs.haskell.lib.dontCheck haskellPackages.polysemy-plugin;
|
|
|
|
polysemy = pkgs.haskell.lib.dontCheck haskellPackages.polysemy;
|
2023-01-02 04:08:21 +03:00
|
|
|
http-api-data = pkgs.haskell.lib.doJailbreak haskellPackages.http-api-data;
|
2021-08-25 06:23:54 +03:00
|
|
|
nixpkgs-update =
|
|
|
|
pkgs.haskell.lib.justStaticExecutables (
|
|
|
|
pkgs.haskell.lib.failOnAllWarnings (
|
|
|
|
pkgs.haskell.lib.disableExecutableProfiling (
|
|
|
|
pkgs.haskell.lib.disableLibraryProfiling (
|
|
|
|
pkgs.haskell.lib.generateOptparseApplicativeCompletion "nixpkgs-update" (
|
2023-01-02 05:07:56 +03:00
|
|
|
(haskellPackages.callPackage ../nixpkgs-update.nix { }).overrideAttrs drvAttrs
|
2021-08-25 06:23:54 +03:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
shell = haskellPackages.shellFor {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
cabal-install
|
|
|
|
ghcid
|
2023-01-02 04:08:21 +03:00
|
|
|
haskellPackages.cabal2nix
|
2021-08-25 06:23:54 +03:00
|
|
|
];
|
|
|
|
packages = ps: [ ps.nixpkgs-update ];
|
|
|
|
shellHook = ''
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
doc = pkgs.stdenvNoCC.mkDerivation rec {
|
|
|
|
name = "nixpkgs-update-doc";
|
|
|
|
src = self;
|
|
|
|
phases = [ "mmdocPhase" ];
|
|
|
|
mmdocPhase = "${mmdoc.packages.${system}.mmdoc}/bin/mmdoc nixpkgs-update $src/doc $out";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
nixpkgs-update = haskellPackages.nixpkgs-update;
|
2023-01-02 02:29:41 +03:00
|
|
|
default = haskellPackages.nixpkgs-update;
|
2021-08-25 06:23:54 +03:00
|
|
|
nixpkgs-update-doc = doc;
|
|
|
|
devShell = shell;
|
|
|
|
}
|