Init
This commit is contained in:
commit
53a27e9502
6 changed files with 179 additions and 0 deletions
11
pkgs/default.nix
Normal file
11
pkgs/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
callPackage = pkgs.callPackage;
|
||||
in
|
||||
rec {
|
||||
kindletool = callPackage ./kindletool.nix { };
|
||||
default = kindletool;
|
||||
}
|
53
pkgs/kindletool.nix
Normal file
53
pkgs/kindletool.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "kindletool";
|
||||
version = "2.6.5-unstable-2025-07-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NiLuJe";
|
||||
repo = "KindleTool";
|
||||
rev = "828bf45bd6010c01fe91bb863bac97ef20cafb44";
|
||||
hash = "sha256-WWb2N/CRXIiFYG6ZRmcfBowiaSLA7jr9x8Zr13MlY2U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
nettle
|
||||
libarchive
|
||||
zlib
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace KindleTool/Makefile \
|
||||
--replace 'DESTDIR?=/usr/local' "DESTDIR?=$out"
|
||||
|
||||
substituteInPlace KindleTool/version.sh \
|
||||
--replace 'COMPILE_BY="$(whoami | sed 's/\\/\\\\/')"' 'COMPILE_BY="???"' \
|
||||
--replace 'COMPILE_HOST="$(hostname -s)"' 'COMPILE_HOST="???"' \
|
||||
--replace 'COMPILE_HOST="$(hostname -s)"' 'COMPILE_HOST="???"'
|
||||
'';
|
||||
|
||||
# installPhase = ''
|
||||
# mkdir -p $out/bin
|
||||
# ls -la ./
|
||||
# touch $out/bin/xx
|
||||
# '';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for creating & extracting Kindle updates and more";
|
||||
mainProgram = "kindletool";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://github.com/NiLuJe/KindleTool";
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue