forked from mirrors/nixpkgs
Merge pull request #197063 from lilyinstarlight/pkg/open-stage-control-1.18.0
open-stage-control: 1.17.0 → 1.18.3
This commit is contained in:
commit
55c2a42adc
|
@ -9,25 +9,34 @@ in
|
|||
|
||||
nodeComposition.package.override rec {
|
||||
pname = "open-stage-control";
|
||||
inherit (nodeComposition.args) version;
|
||||
version = "1.18.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jean-emmanuel";
|
||||
repo = "open-stage-control";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-q18pRtsHfme+OPmi3LhJDK1AdpfkwhoE9LA2rNenDtY=";
|
||||
hash = "sha256-AXdPxTauy2rMRMdfUjkfTjbNDgOKmoiGUeeLak0wu84=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
makeBinaryWrapper
|
||||
nodejs
|
||||
python3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
python3.pkgs.python-rtmidi
|
||||
];
|
||||
|
||||
dontNpmInstall = true;
|
||||
doInstallCheck = true;
|
||||
|
||||
preRebuild = ''
|
||||
# remove electron to prevent building since nixpkgs electron is used instead
|
||||
rm -r node_modules/electron
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# build assets
|
||||
|
@ -48,7 +57,6 @@ nodeComposition.package.override rec {
|
|||
installCheckPhase = ''
|
||||
XDG_CONFIG_HOME="$(mktemp -d)" $out/bin/open-stage-control --help
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
|
@ -62,6 +70,8 @@ nodeComposition.package.override rec {
|
|||
})
|
||||
];
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Libre and modular OSC / MIDI controller";
|
||||
homepage = "https://openstagecontrol.ammd.net/";
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/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
|
1925
pkgs/applications/audio/open-stage-control/node-packages.nix
generated
1925
pkgs/applications/audio/open-stage-control/node-packages.nix
generated
File diff suppressed because it is too large
Load diff
25
pkgs/applications/audio/open-stage-control/update.sh
Executable file
25
pkgs/applications/audio/open-stage-control/update.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p common-updater-scripts jq nodePackages.node2nix
|
||||
set -euo pipefail
|
||||
|
||||
# Find nixpkgs repo
|
||||
nixpkgs="$(git rev-parse --show-toplevel || (printf 'Could not find root of nixpkgs repo\nAre we running from within the nixpkgs git repo?\n' >&2; exit 1))"
|
||||
|
||||
# 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 -sSL https://raw.githubusercontent.com/jean-emmanuel/open-stage-control/"$tag"/package.json | grep -v '"electron"\|"electron-installer-debian"' >"$nixpkgs"/pkgs/applications/audio/open-stage-control/package.json
|
||||
|
||||
# Lock dependencies with node2nix
|
||||
node2nix \
|
||||
--node-env "$nixpkgs"/pkgs/development/node-packages/node-env.nix \
|
||||
--nodejs-16 \
|
||||
--input "$nixpkgs"/pkgs/applications/audio/open-stage-control/package.json \
|
||||
--output "$nixpkgs"/pkgs/applications/audio/open-stage-control/node-packages.nix \
|
||||
--composition "$nixpkgs"/pkgs/applications/audio/open-stage-control/node-composition.nix
|
||||
|
||||
rm -f "$nixpkgs"/pkgs/applications/audio/open-stage-control/package.json
|
||||
|
||||
# Update hash
|
||||
(cd "$nixpkgs" && update-source-version "${UPDATE_NIX_ATTR_PATH:-open-stage-control}" "${tag#v}")
|
Loading…
Reference in a new issue