From de07d6262e92cdd6d82866cc9e0923a5b50a0a81 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Tue, 3 Oct 2023 13:39:21 +0200 Subject: [PATCH] openscad-snapshot: init at 2023.08.25.ai16051 last version with working offscreen rendering --- default.nix | 1 + pkgs/openscad-snapshot/default.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/openscad-snapshot/default.nix diff --git a/default.nix b/default.nix index fc17d42..857c830 100644 --- a/default.nix +++ b/default.nix @@ -17,6 +17,7 @@ diskgraph = pkgs.callPackage ./pkgs/diskgraph { }; freqtop = pkgs.callPackage ./pkgs/freqtop { }; map = pkgs.callPackage ./pkgs/map { }; + openscad-snapshot = pkgs.callPackage ./pkgs/openscad-snapshot { }; q = pkgs.callPackage ./pkgs/q { }; # TODO: fix dependency specification #raspi-oled = pkgs.callPackage ./pkgs/raspi-oled { }; diff --git a/pkgs/openscad-snapshot/default.nix b/pkgs/openscad-snapshot/default.nix new file mode 100644 index 0000000..6d948bf --- /dev/null +++ b/pkgs/openscad-snapshot/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchurl, appimageTools, openscad, makeWrapper }: + +let + pname = "openscad"; + version = "2023.08.25.ai16051"; + src = fetchurl { + url = "https://files.openscad.org/snapshots/OpenSCAD-${version}-x86_64.AppImage"; + sha256 = "sha256-mEGmkL2lL7JxK0nRPLtnfg4vxtkK3URz351eyuRHZPE="; + }; + appimageContents = appimageTools.extractType2 { inherit pname version src; }; +in +appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + source "${makeWrapper}/nix-support/setup-hook" + wrapProgram $out/bin/${pname}-${version} \ + --unset QT_PLUGIN_PATH + ''; + + meta = with lib; { + inherit (openscad.meta); + maintainers = with maintainers; [ fliegendewurst ]; + }; +}