nixpkgs-overlay/flake.nix

105 lines
2.8 KiB
Nix
Raw Normal View History

2021-05-13 08:51:44 +02:00
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix/master";
nix-pre-commit-hooks.inputs.flake-utils.follows = "flake-utils";
nix-pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, flake-utils, nixpkgs, nix-pre-commit-hooks }: {
overlay = final: prev:
let
inherit (prev) callPackage;
callPythonPackage = prev.python3Packages.callPackage;
in
{
python3 = prev.python3.override {
packageOverrides = final: prev:
{
deezer-py = callPythonPackage ./python-modules/deezer-py { };
enlighten = callPythonPackage ./python-modules/enlighten { };
prefixed = callPythonPackage ./python-modules/prefixed { };
};
};
python3Packages = prev.recurseIntoAttrs final.python3.pkgs;
2021-05-13 13:13:08 +02:00
cyanrip = callPackage ./cyanrip { };
deemix = callPythonPackage ./deemix { };
face_morpher = callPythonPackage ./face_morpher { };
2021-05-15 14:05:10 +02:00
mpvScripts = prev.mpvScripts // {
pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { };
};
2021-07-21 20:32:47 +02:00
nsz = callPythonPackage ./nsz { };
2021-05-19 14:58:21 +02:00
oha = callPackage ./oha { };
2021-06-05 16:47:10 +02:00
snownews = callPackage ./snownews { };
2021-05-13 09:41:26 +02:00
textidote = callPackage ./textidote { };
2021-05-14 18:34:11 +02:00
unxwb = callPackage ./unxwb { };
vgmstream = callPackage ./vgmstream { };
2021-05-13 08:56:01 +02:00
VisiCut = callPackage ./VisiCut { };
x264-unstable = prev.x264.overrideAttrs (callPackage ./x264-unstable { });
2021-05-13 08:51:44 +02:00
};
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
lib = pkgs.lib;
in
rec {
checks = {
pre-commit-check = nix-pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
};
};
};
devShell = pkgs.mkShell {
shellHook = checks.pre-commit-check.shellHook;
};
packages = lib.filterAttrs
(n: v: lib.elem system v.meta.platforms)
2021-05-15 14:05:10 +02:00
(flake-utils.lib.flattenTree {
2021-05-13 08:56:01 +02:00
inherit (pkgs)
VisiCut
2021-05-13 13:13:08 +02:00
cyanrip
deemix
face_morpher
2021-07-21 20:32:47 +02:00
nsz
2021-05-19 14:58:21 +02:00
oha
2021-06-05 16:47:10 +02:00
snownews
2021-05-13 09:41:26 +02:00
textidote
2021-05-14 18:34:11 +02:00
unxwb
vgmstream
x264-unstable;
2021-05-15 14:05:10 +02:00
mpvScripts = lib.recurseIntoAttrs {
inherit (pkgs.mpvScripts)
pitchcontrol;
};
});
2021-05-13 08:51:44 +02:00
# My hydra only has x86_64-linux builders
hydraJobs =
if lib.elem system [ "x86_64-linux" ]
then packages
else { };
});
}