From 7e85f62e40cd585ce81fa1f3debd5385bb0cad03 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Fri, 1 Jul 2022 17:06:28 +0200 Subject: [PATCH] pixitracker: init at 1.6.5 --- default.nix | 4 +++- pkgs/pixitracker/default.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 pkgs/pixitracker/default.nix diff --git a/default.nix b/default.nix index 14e63e9..9ddfca9 100644 --- a/default.nix +++ b/default.nix @@ -6,7 +6,7 @@ # commands such as: # nix-build -A mypackage -{ pkgs ? import {} }: +{ pkgs ? import {} }: let # wsgiserver = pkgs.callPackage ./pkgs/python-modules/wsgiserver { buildPythonPackage = pkgs.python3Packages.buildPythonPackage; fetchPypi = pkgs.python3Packages.fetchPypi; }; @@ -42,6 +42,8 @@ rec { # radical-native = pkgs.callPackage ./pkgs/radical-native { }; photini = pkgs.libsForQt5.callPackage ./pkgs/photini { }; + pixitracker = pkgs.callPackage ./pkgs/pixitracker { }; + plotbitrate = pkgs.callPackage ./pkgs/plotbitrate { }; wii-u-gc-adapter = pkgs.callPackage ./pkgs/wii-u-gc-adapter { }; diff --git a/pkgs/pixitracker/default.nix b/pkgs/pixitracker/default.nix new file mode 100644 index 0000000..826aeee --- /dev/null +++ b/pkgs/pixitracker/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchzip, autoPatchelfHook, writeShellScript +, libglvnd, glibc, alsaLib, SDL2 +}: + +let + script = writeShellScript "pixitracker-launch" '' + cd @out@/lib + ./bin/pixilang_linux_x86_64 boot.pixicode + ''; +in +stdenv.mkDerivation rec { + pname = "pixitracker"; + version = "1.6.5"; + + src = fetchzip { + url = "https://www.warmplace.ru/soft/pixitracker/${pname}-${version}.zip"; + sha256 = "sha256-X4FnITdLs2WXJvM6nSZH2ANUBb7BT8J1FgCQ21j4fa4="; + }; + + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ libglvnd glibc alsaLib SDL2 ]; + + installPhase = '' + runHook preInstall; + + mkdir -p "$out/lib" "$out/bin" + mv * "$out/lib" + + cp ${script} $out/bin/pixitracker + sed -i s#@out@#$out# $out/bin/pixitracker + + runHook postInstall; + ''; + +}