-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathflake.nix
54 lines (48 loc) · 1.43 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "A wrapper for ffmpeg and mp4v2 to merge, split, and manipulate audiobooks";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
{
overlay = nixpkgs.lib.composeManyExtensions [
(final: prev: {
m4b-tool = final.callPackage ./default.nix {};
})
];
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
composer2NixSrc = pkgs.fetchFromGitHub {
owner = "svanderburg";
repo = "composer2nix";
rev = "v0.0.6";
sha256 = "sha256-P3acfGwHYjjZQcviPiOT7T7qzzP/drc2mibzrsrNP18=";
};
composer2Nix = import composer2NixSrc {
inherit pkgs system;
};
in
rec {
packages = rec {
m4b-tool = pkgs.m4b-tool;
m4b-tool-libfdk = m4b-tool.override {
useLibfdkFfmpeg = true;
};
default = m4b-tool;
};
apps = rec {
m4b-tool = flake-utils.lib.mkApp { drv = self.packages.${system}.m4b-tool; };
default = m4b-tool;
};
devShell = pkgs.mkShell {
buildInputs = [
composer2Nix
] ++ pkgs.m4b-tool.dependencies ++ pkgs.m4b-tool.devDependencies;
};
}));
}