feat: add dedrm
This commit is contained in:
parent
e626f26b03
commit
46bf021eee
3 changed files with 47 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
{
|
{
|
||||||
packages = forEachSystem (system: {
|
packages = forEachSystem (system: {
|
||||||
acsm-calibre-plugin = pkgsForEach.${system}.callPackage ./packages/acsm-calibre-plugin { };
|
acsm-calibre-plugin = pkgsForEach.${system}.callPackage ./packages/acsm-calibre-plugin { };
|
||||||
|
dedrm-plugin = pkgsForEach.${system}.callPackage ./packages/dedrm-plugin { };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
12
install.sh
Executable file
12
install.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
|
process() {
|
||||||
|
echo "Building $1"
|
||||||
|
nix build ".#$1"
|
||||||
|
echo "Installing $1"
|
||||||
|
calibre-customize -r "$2"
|
||||||
|
calibre-customize -a result
|
||||||
|
}
|
||||||
|
|
||||||
|
process acsm-calibre-plugin "ACSM Input"
|
||||||
|
process dedrm-plugin "DeDRM"
|
34
packages/dedrm-plugin/default.nix
Normal file
34
packages/dedrm-plugin/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
python311,
|
||||||
|
ensureNewerSourcesForZipFilesHook,
|
||||||
|
unzip,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "dedrmu-plugin";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "noDRM";
|
||||||
|
repo = "DeDRM_tools";
|
||||||
|
rev = "7379b453199ed1ba91bf3a4ce4875d5ed3c309a9";
|
||||||
|
hash = "sha256-Hq/DBYeJ2urJtxG+MiO2L8TGZ9/kLue1DXbG4/KJFhc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
python311
|
||||||
|
ensureNewerSourcesForZipFilesHook
|
||||||
|
unzip
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase =
|
||||||
|
# sh
|
||||||
|
''
|
||||||
|
set -e
|
||||||
|
python3 ./make_release.py
|
||||||
|
mkdir tmp
|
||||||
|
unzip DeDRM_tools.zip -d tmp
|
||||||
|
cp tmp/DeDRM_plugin.zip $out
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue