From 30a5f03eed1dd0e8ce03f8052842828e3ca26aa6 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Sun, 2 Jun 2024 18:11:04 -0300 Subject: [PATCH] blender-cadsketcher is compiling --- nixos/cad.nix | 10 ++++----- pkgs/blender-cadsketcher/default.nix | 33 ++++++++++++++++------------ pkgs/creality-print/default.nix | 3 +-- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/nixos/cad.nix b/nixos/cad.nix index 052521e..5d001b8 100644 --- a/nixos/cad.nix +++ b/nixos/cad.nix @@ -2,11 +2,7 @@ { environment.systemPackages = with pkgs; [ - pkgs.openscad - pkgs.blender - #pkgs.blender-cadsketcher - #pkgs.py-slvs - pkgs.freecad + #pkgs.creality-print (pkgs.appimageTools.wrapType2 { name = "creality-print"; @@ -15,6 +11,10 @@ sha256 = "sha256-WUsL7UbxSY94H4F1Ww8vLsfRyeg2/DZ+V4B6eH3M6+M="; }; }) + pkgs.openscad + pkgs.blender-cadsketcher + #pkgs.py-slvs + pkgs.freecad # (pkgs.appimageTools.wrapType2 # { # name = "orca-slicer"; diff --git a/pkgs/blender-cadsketcher/default.nix b/pkgs/blender-cadsketcher/default.nix index 1c34bc3..395c2ce 100644 --- a/pkgs/blender-cadsketcher/default.nix +++ b/pkgs/blender-cadsketcher/default.nix @@ -1,31 +1,36 @@ -{ lib, blender, python3Packages, fetchFromGitHub, pkgs }: +{ lib, blender, python3Packages, fetchFromGitHub, pkgs, fetchurl}: let py-slvs = python3Packages.buildPythonPackage rec { + pname = "py-slvs"; version = "1.0.6"; - - src = fetchFromGitHub { - owner = "realthunder"; - repo = "slvs_py"; - rev = "v${version}"; - sha256 = "hBuW8Guqli/jMFPygG8jq5ZLs508Ss+lmBORuW6yTxs="; + src = fetchurl { + url = "https://pypi.org/packages/source/p/py_slvs/py_slvs-1.0.6.tar.gz"; + sha256 = "sha256-U6T/aXy0JTC1ptL5oBmch0ytSPmIkRA8XOi31NpArnI="; }; - nativeBuildInputs = [ pkgs.swig pkgs.cmake pkgs.ninja ]; + pyproject = true; - cmakeFlags = [ - "-B." - "-H${src}" + nativeBuildInputs = with pkgs; [ + swig ]; - propagatedBuildInputs = with python3Packages; [ setuptools wheel scikit-build cmake ninja ]; + propagatedBuildInputs = with python3Packages; [ + cmake + ninja + setuptools + scikit-build + ]; - meta = { + dontUseCmakeConfigure = true; + + meta = with pkgs.lib; { description = "Python binding of SOLVESPACE geometry constraint solver"; homepage = "https://github.com/realthunder/slvs_py"; - license = lib.licenses.gpl3; + license = licenses.gpl3; }; + }; in blender.overrideAttrs (oldAttrs: { diff --git a/pkgs/creality-print/default.nix b/pkgs/creality-print/default.nix index 21712e6..cb24ac0 100644 --- a/pkgs/creality-print/default.nix +++ b/pkgs/creality-print/default.nix @@ -31,7 +31,7 @@ let in # Define the package pkgs.stdenv.mkDerivation { - name = "creality-print-app"; + name = "creality-print"; buildInputs = [ creality-print ]; nativeBuildInputs = [ pkgs.makeWrapper ]; @@ -54,4 +54,3 @@ pkgs.stdenv.mkDerivation { platforms = platforms.linux; }; } -