failed attempt at packages cecelia5

This commit is contained in:
Matt Nish-Lapidus 2024-12-20 13:45:48 -05:00
parent a4cbf82744
commit 70f0da2d99
5 changed files with 106 additions and 7 deletions

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function pdf-compress --description 'compress a pdf using ghostscript. produces output.pdf'
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dNOPAUSE -dBATCH -sOutputFile=output.pdf $argv
end

12
flake.lock generated
View file

@ -174,11 +174,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1734119587,
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github"
},
"original": {
@ -190,11 +190,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"lastModified": 1734600368,
"narHash": "sha256-nbG9TijTMcfr+au7ZVbKpAhMJzzE2nQBYmRvSdXUD8g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"rev": "b47fd6fa00c6afca88b8ee46cfdb00e104f50bca",
"type": "github"
},
"original": {

View file

@ -27,6 +27,7 @@
dconf2nix
readline
gnupg
imagemagick
gcc
gnutls
gettext
@ -91,7 +92,7 @@
ccl
racket
gdu
poppler_utils
editorconfig-core-c
clang-tools
cljfmt
@ -154,6 +155,7 @@
fishPlugins.autopair
fishPlugins.forgit
fishPlugins.colored-man-pages
imgcat
via
vial
@ -162,6 +164,15 @@
tailscale
font-manager
scribus
pdfarranger
tdf
pdfchain
pdftk
ghostscript
zathura
gpu-viewer
mesa-demos
@ -323,6 +334,8 @@
(callPackage ../packages/the-usual-suspects/ostirus/ostirus.nix {})
(callPackage ../packages/the-usual-suspects/osirus/osirus.nix {})
# (callPackage ../packages/cecelia5/default.nix {})
# Fonts
fira-code
fira

View file

@ -0,0 +1,46 @@
{
lib,
python311,
fetchFromGitHub,
pkgs
}:
let
python311 = pkgs.python311.override {
self = python311;
packageOverrides = pyfinal: pyprev: {
pyo = pyfinal.callPackage ./pyo.nix { };
};
};
in
python311.pkgs.buildPythonApplication rec {
pname = "cecilia5";
version = "5.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "belangeo";
repo = "cecilia5";
rev = version;
hash = "sha256-8WnzVSaDz4x6JgRGSI4Ra60hDS1fy+oCRLdyQIfq6WI=";
};
build-system = [
python311.pkgs.setuptools
python311.pkgs.wheel
python311.pkgs.pyo
python311.pkgs.wxpython
python311.pkgs.numpy
];
pythonImportsCheck = [
"cecilia5"
];
meta = {
description = "Ear-bending noises and music";
homepage = "https://github.com/belangeo/cecilia5";
mainProgram = "cecilia5";
};
}

35
packages/cecelia5/pyo.nix Normal file
View file

@ -0,0 +1,35 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
wheel,
pkgs
}:
buildPythonPackage rec {
pname = "pyo";
version = "1.0.5";
src = fetchPypi {
inherit pname version;
hash = "sha256-4ELZR6C2QbQA4ij54h7soh34v0iVxtvQE/h2ONdyjjE=";
};
propagatedBuildInputs = with pkgs; [
portaudio
libsndfile
portmidi
liblo
];
# do not run tests
doCheck = false;
# specific to buildPythonPackage, see its reference
pyproject = true;
build-system = [
setuptools
wheel
];
}