From a4cbf82744e2119f843e1e269985524f3d8d3964 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Tue, 17 Dec 2024 10:47:55 -0500 Subject: [PATCH] flakeup and mioctl package --- flake.lock | 6 +++--- home/home.nix | 17 +++++++++-------- packages/mioctl/mioctl.nix | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 packages/mioctl/mioctl.nix diff --git a/flake.lock b/flake.lock index 187c8ef..abe1e97 100644 --- a/flake.lock +++ b/flake.lock @@ -190,11 +190,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1734083684, - "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", "type": "github" }, "original": { diff --git a/home/home.nix b/home/home.nix index a10807e..858e200 100644 --- a/home/home.nix +++ b/home/home.nix @@ -78,14 +78,14 @@ jpm guile python311 - python311Packages.pip - python311Packages.mido - python311Packages.simpleeval - python311Packages.parsedatetime - python311Packages.pytz - python311Packages.pint - python311Packages.babel - python311Packages.requests + # python311Packages.pip + # python311Packages.mido + # python311Packages.simpleeval + # python311Packages.parsedatetime + # python311Packages.pytz + # python311Packages.pint + # python311Packages.babel + # python311Packages.requests ruff sbcl ccl @@ -290,6 +290,7 @@ dockfmt clap batik + (callPackage ../packages/mioctl/mioctl.nix {}) # Audio plugins (LV2, VST2, VST3, LADSPA) eq10q diff --git a/packages/mioctl/mioctl.nix b/packages/mioctl/mioctl.nix new file mode 100644 index 0000000..8f2ba79 --- /dev/null +++ b/packages/mioctl/mioctl.nix @@ -0,0 +1,36 @@ +{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }: + +stdenv.mkDerivation rec { + pname = "mioctl"; + version = "latest"; + + src = fetchurl { + url = "https://codeberg.org/pmatilai/mioctl/archive/master.zip"; + sha256 = "sha256-GFCUqao+LC9SgparV1699D72wnD0kZeroyq5DRxdJos="; + }; + + nativeBuildInputs = [ makeWrapper unzip ]; + + propagatedBuildInputs = [ + (pkgs.python311.withPackages (pythonPackages: with pythonPackages; [ + mido + python-rtmidi + ])) + ]; + + unpackPhase = '' + unzip $src + ''; + + installPhase = '' + mkdir -p $out/bin + + cp -r mioctl/mioctl $out/bin + ''; + + meta = with lib; { + homepage = "https://codeberg.org/pmatilai/mioctl"; + description = "linux cli for mioXL in python"; + platforms = platforms.linux; + }; +}