mirror of
https://github.com/nix-community/nixpkgs-update.git
synced 2024-10-04 09:37:58 +03:00
c0b71beded
This was causing the project to get compiled twice on every build. If someone needs profiling they can turn this off temporarily.
64 lines
1.6 KiB
Nix
64 lines
1.6 KiB
Nix
{
|
|
description = "A flake for nixpkgs-update";
|
|
|
|
inputs.nixpkgs = {
|
|
type = "github";
|
|
owner = "nixos";
|
|
repo = "nixpkgs";
|
|
rev = "78bfdbb291fd20df0f0f65061ee3081610b0a48f";
|
|
};
|
|
|
|
inputs.nixpkgs-review = {
|
|
type = "github";
|
|
owner = "Mic92";
|
|
repo = "nixpkgs-review";
|
|
flake = false;
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixpkgs-review }:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
config = { allowBroken = true; };
|
|
};
|
|
|
|
compiler = pkgs.haskell.packages.ghc883;
|
|
|
|
developPackageAttrs = {
|
|
name = "nixpkgs-update";
|
|
root = self;
|
|
overrides = self: super: { };
|
|
source-overrides = { };
|
|
modifier = pkgs.haskell.lib.disableLibraryProfiling;
|
|
};
|
|
|
|
developPackageShellAttrs = developPackageAttrs // {
|
|
returnShellEnv = true;
|
|
};
|
|
|
|
drvAttrs = attrs: with pkgs; {
|
|
# TODO: lock down coreutils paths too
|
|
NIX = nix;
|
|
GIT = git;
|
|
HUB = gitAndTools.hub;
|
|
JQ = jq;
|
|
TREE = tree;
|
|
GIST = gist;
|
|
NIXPKGSREVIEW = (import nixpkgs-review { inherit pkgs; });
|
|
};
|
|
|
|
drvShellAttrs = attrs: (drvAttrs attrs) // (with pkgs; {
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ cabal-install ghcid ];
|
|
});
|
|
|
|
pkg = (compiler.developPackage developPackageAttrs).overrideAttrs drvAttrs;
|
|
|
|
shell = (compiler.developPackage developPackageShellAttrs).overrideAttrs drvShellAttrs;
|
|
|
|
in {
|
|
devShell = shell;
|
|
packages.x86_64-linux.nixpkgs-update = pkg;
|
|
defaultPackage.x86_64-linux = self.packages.x86_64-linux.nixpkgs-update;
|
|
};
|
|
}
|