add supernote-tool
This commit is contained in:
parent
a8332a6a18
commit
78fc46ef15
4 changed files with 70 additions and 1 deletions
|
|
@ -52,12 +52,14 @@
|
|||
lib' = import ./lib.nix { inherit lib var; };
|
||||
|
||||
pkgs_25-05 = import nixpkgs_25-05 { system = "x86_64-linux"; };
|
||||
mypkgs = self.packages.x86_64-linux;
|
||||
|
||||
specialArgs = rec {
|
||||
inherit
|
||||
inputs
|
||||
lib'
|
||||
pkgs_25-05
|
||||
mypkgs
|
||||
var
|
||||
;
|
||||
secrets = lib'.walk-dir ./secrets;
|
||||
|
|
@ -107,7 +109,7 @@
|
|||
// flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells = import ./devshells { inherit pkgs; } // {
|
||||
|
|
@ -122,6 +124,7 @@
|
|||
};
|
||||
};
|
||||
formatter = pkgs.nixfmt-tree;
|
||||
packages = import ./packages { inherit inputs system; };
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
mypkgs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
|
@ -13,6 +14,7 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
mypkgs.supernote-tool
|
||||
bitwarden-desktop
|
||||
calibre
|
||||
colmena
|
||||
|
|
|
|||
7
packages/default.nix
Normal file
7
packages/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ inputs, system }:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
supernote-tool = pkgs.callPackage ./supernote-tool.nix { };
|
||||
}
|
||||
57
packages/supernote-tool.nix
Normal file
57
packages/supernote-tool.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
let
|
||||
potracer = python3Packages.buildPythonPackage {
|
||||
pname = "potracer";
|
||||
version = "0.0.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tatarize";
|
||||
repo = "potrace";
|
||||
rev = "8d8a6780743e09204aa8a355993016aeba383c62";
|
||||
hash = "sha256-afK7NdpxNm+lCN2i2h5V52AiE3uUiYRtbSYSzcKL2sc=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
python3Packages.setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python3Packages.numpy
|
||||
];
|
||||
};
|
||||
in
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "supernote-tool";
|
||||
version = "0.6.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jya-dev";
|
||||
repo = "supernote-tool";
|
||||
rev = "853e4aa1b3094a3c4384d2eae725bad2fe7e69c5";
|
||||
hash = "sha256-EKfhg0puWu41cY3v+cV1f/0eel08sOAFf5tx+csFO1g=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
python3Packages.hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
colour
|
||||
fusepy
|
||||
numpy
|
||||
pillow
|
||||
potracer
|
||||
pypng
|
||||
reportlab
|
||||
svglib
|
||||
svgwrite
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue