mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
Merge pull request #170464 from lilyinstarlight/pkg/open-stage-control
This commit is contained in:
commit
f49fe4a120
72
pkgs/applications/audio/open-stage-control/default.nix
Normal file
72
pkgs/applications/audio/open-stage-control/default.nix
Normal file
@ -0,0 +1,72 @@
|
||||
{ pkgs, stdenv, lib, fetchFromGitHub, makeBinaryWrapper, makeDesktopItem, copyDesktopItems, nodejs, electron, python3, ... }:
|
||||
|
||||
let
|
||||
nodeComposition = import ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
};
|
||||
in
|
||||
|
||||
nodeComposition.package.override rec {
|
||||
pname = "open-stage-control";
|
||||
inherit (nodeComposition.args) version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jean-emmanuel";
|
||||
repo = "open-stage-control";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-q18pRtsHfme+OPmi3LhJDK1AdpfkwhoE9LA2rNenDtY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
python3.pkgs.python-rtmidi
|
||||
];
|
||||
|
||||
dontNpmInstall = true;
|
||||
|
||||
postInstall = ''
|
||||
# build assets
|
||||
npm run build
|
||||
|
||||
# copy icon
|
||||
install -Dm644 resources/images/logo.png $out/share/icons/hicolor/256x256/apps/open-stage-control.png
|
||||
install -Dm644 resources/images/logo.svg $out/share/icons/hicolor/scalable/apps/open-stage-control.svg
|
||||
|
||||
# wrap electron and include python-rtmidi
|
||||
makeWrapper '${electron}/bin/electron' $out/bin/open-stage-control \
|
||||
--inherit-argv0 \
|
||||
--add-flags $out/lib/node_modules/open-stage-control/app \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--prefix PATH : '${lib.makeBinPath [ python3 ]}'
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
XDG_CONFIG_HOME="$(mktemp -d)" $out/bin/open-stage-control --help
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "open-stage-control";
|
||||
exec = "open-stage-control";
|
||||
icon = "open-stage-control";
|
||||
desktopName = "Open Stage Control";
|
||||
comment = meta.description;
|
||||
categories = [ "Network" "Audio" "AudioVideo" "Midi" ];
|
||||
startupWMClass = "open-stage-control";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Libre and modular OSC / MIDI controller";
|
||||
homepage = "https://openstagecontrol.ammd.net/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ lilyinstarlight ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
18
pkgs/applications/audio/open-stage-control/generate-dependencies.sh
Executable file
18
pkgs/applications/audio/open-stage-control/generate-dependencies.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p jq nodePackages.node2nix
|
||||
|
||||
# Get latest release tag
|
||||
tag="$(curl -s https://api.github.com/repos/jean-emmanuel/open-stage-control/releases/latest | jq -r .tag_name)"
|
||||
|
||||
# Download package.json from the latest release
|
||||
curl -s https://raw.githubusercontent.com/jean-emmanuel/open-stage-control/"$tag"/package.json | grep -v '"electron"\|"electron-installer-debian"\|"electron-packager"\|"electron-packager-plugin-non-proprietary-codecs-ffmpeg"' >package.json
|
||||
|
||||
# Lock dependencies with node2nix
|
||||
node2nix \
|
||||
--node-env ../../../development/node-packages/node-env.nix \
|
||||
--nodejs-16 \
|
||||
--input package.json \
|
||||
--output node-packages.nix \
|
||||
--composition node-composition.nix
|
||||
|
||||
rm -f package.json
|
@ -0,0 +1,17 @@
|
||||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-16_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
8311
pkgs/applications/audio/open-stage-control/node-packages.nix
generated
Normal file
8311
pkgs/applications/audio/open-stage-control/node-packages.nix
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -29218,6 +29218,11 @@ with pkgs;
|
||||
|
||||
openscad = libsForQt5.callPackage ../applications/graphics/openscad {};
|
||||
|
||||
open-stage-control = callPackage ../applications/audio/open-stage-control {
|
||||
electron = electron_15;
|
||||
nodejs = nodejs-16_x;
|
||||
};
|
||||
|
||||
opentimestamps-client = python3Packages.callPackage ../tools/misc/opentimestamps-client {};
|
||||
|
||||
opentoonz = let
|
||||
|
Loading…
Reference in New Issue
Block a user