43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{
|
|||
|
|
description = "Maintain a lossy MP3 mirror of a lossless music library";
|
||
|
|
|
||
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||
|
|
|
||
|
|
outputs =
|
||
|
|
{ self, nixpkgs }:
|
||
|
|
let
|
||
|
|
systems = [
|
||
|
|
"x86_64-linux"
|
||
|
|
"aarch64-linux"
|
||
|
|
"x86_64-darwin"
|
||
|
|
"aarch64-darwin"
|
||
|
|
];
|
||
|
|
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
|
||
|
|
in
|
||
|
|
{
|
||
|
|
overlays.default = final: _prev: {
|
||
|
|
music-mirror = final.callPackage ./package.nix { };
|
||
|
|
};
|
||
|
|
|
||
|
|
packages = forAllSystems (pkgs: rec {
|
||
|
|
music-mirror = pkgs.callPackage ./package.nix { };
|
||
|
|
default = music-mirror;
|
||
|
|
});
|
||
|
|
|
||
|
|
# The package builds only if the test suite passes, so this covers both.
|
||
|
|
checks = forAllSystems (pkgs: { inherit (self.packages.${pkgs.system}) music-mirror; });
|
||
|
|
|
||
|
|
devShells = forAllSystems (pkgs: {
|
||
|
|
default = pkgs.mkShellNoCC {
|
||
|
|
packages = [
|
||
|
|
pkgs.python3
|
||
|
|
pkgs.python3Packages.pytest
|
||
|
|
pkgs.ffmpeg
|
||
|
|
];
|
||
|
|
};
|
||
|
|
});
|
||
|
|
|
||
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
|
||
|
|
};
|
||
|
|
}
|