format nix

This commit is contained in:
ChaotiCryptidz 2022-02-08 11:43:17 +00:00
parent 3dff1ae3eb
commit 784fade8c0

View file

@ -15,29 +15,31 @@
overlay = final: prev: overlay = final: prev:
let let
system = final.system; system = final.system;
fold-to-ascii = final.python3Packages.callPackage ./nix-extra-deps/fold-to-ascii.nix { }; fold-to-ascii =
final.python3Packages.callPackage ./nix-extra-deps/fold-to-ascii.nix
{ };
in { in {
fold-to-ascii = {fold-to-ascii = fold-to-ascii;}; fold-to-ascii = { fold-to-ascii = fold-to-ascii; };
musicutil = final.python3Packages.buildPythonApplication rec { musicutil = final.python3Packages.buildPythonApplication rec {
pname = "musicutil"; pname = "musicutil";
version = "latest"; version = "latest";
src = ./.; src = ./.;
postPatch = '' postPatch = ''
substituteInPlace musicutil/meta.py --replace 'ffmpeg_path = "ffmpeg"' 'ffmpeg_path = "${final.ffmpeg}/bin/ffmpeg"' substituteInPlace musicutil/meta.py --replace 'ffmpeg_path = "ffmpeg"' 'ffmpeg_path = "${final.ffmpeg}/bin/ffmpeg"'
substituteInPlace musicutil/meta.py --replace 'ffprobe_path = "ffprobe"' 'ffprobe_path = "${final.ffmpeg}/bin/ffprobe"' substituteInPlace musicutil/meta.py --replace 'ffprobe_path = "ffprobe"' 'ffprobe_path = "${final.ffmpeg}/bin/ffprobe"'
substituteInPlace musicutil/meta.py --replace 'r128gain_path = "r128gain"' 'r128gain_path = "${final.r128gain}/bin/r128gain"' substituteInPlace musicutil/meta.py --replace 'r128gain_path = "r128gain"' 'r128gain_path = "${final.r128gain}/bin/r128gain"'
''; '';
doCheck = false; doCheck = false;
propagatedBuildInputs = with final.python3Packages; [ propagatedBuildInputs = with final.python3Packages; [
mutagen mutagen
fold-to-ascii fold-to-ascii
pyyaml pyyaml
]; ];
}; };
}; };
} // utils.lib.eachSystem (utils.lib.defaultSystems) (system: } // utils.lib.eachSystem (utils.lib.defaultSystems) (system:
let let
@ -57,13 +59,12 @@
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.musicutil ]; inputsFrom = [ self.packages.${system}.musicutil ];
buildInputs = with pkgs; buildInputs = with pkgs; [
[ nixUnstable
nixUnstable mutagen
mutagen self.packages.${system}.fold-to-ascii
self.packages.${system}.fold-to-ascii pyyaml
pyyaml ];
];
}; };
lib = pkgs.musicutil.lib; lib = pkgs.musicutil.lib;
}); });