mirror of
https://github.com/nix-community/nixpkgs-update.git
synced 2024-11-28 23:22:00 +03:00
12287b8560
We no longer need to use niv.
70 lines
1.7 KiB
Nix
70 lines
1.7 KiB
Nix
{
|
|
description = "A flake for nixpkgs-update";
|
|
|
|
inputs.flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
flake = false;
|
|
};
|
|
|
|
inputs.nixpkgs = {
|
|
type = "github";
|
|
owner = "nixos";
|
|
repo = "nixpkgs";
|
|
rev = "78bfdbb291fd20df0f0f65061ee3081610b0a48f";
|
|
};
|
|
|
|
inputs.nixpkgs-review = {
|
|
type = "github";
|
|
owner = "Mic92";
|
|
repo = "nixpkgs-review";
|
|
flake = false;
|
|
};
|
|
|
|
outputs = { self, flake-compat, 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;
|
|
returnShellEnv = false;
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|