Cura flake and minor changes to Emacs

This commit is contained in:
Magic_RB 2020-12-27 00:51:13 +01:00
parent 2ec160c6a0
commit e9d9fc5545
5 changed files with 154 additions and 16 deletions

7
nixpkgs/cura/default.nix Normal file
View file

@ -0,0 +1,7 @@
(import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
) {
src = ./.;
}).defaultNix

63
nixpkgs/cura/flake.lock Normal file
View file

@ -0,0 +1,63 @@
{
"nodes": {
"cura": {
"flake": false,
"locked": {
"lastModified": 1605004206,
"narHash": "sha256-NemSXFoepCLEzl11tF2bu/Iisz8y2wj0HKneePXHDhg=",
"ref": "4.8",
"rev": "58bae31d903b868463ae5c3650301a8e559d8cb9",
"revCount": 24662,
"type": "git",
"url": "https://github.com/Ultimaker/Cura"
},
"original": {
"ref": "4.8",
"type": "git",
"url": "https://github.com/Ultimaker/Cura"
}
},
"materials": {
"flake": false,
"locked": {
"lastModified": 1605089480,
"narHash": "sha256-Y7A1vIbd+0k+rfCX66TcoaLVNFUjt743yPQrq13gKUI=",
"ref": "4.8",
"rev": "933c9b3897acf49bf3918d0d5c9607135e379579",
"revCount": 695,
"type": "git",
"url": "https://github.com/Ultimaker/fdm_materials"
},
"original": {
"ref": "4.8",
"type": "git",
"url": "https://github.com/Ultimaker/fdm_materials"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1608062904,
"narHash": "sha256-QVaxOnGwZoBtNTlnAV0aeC30ASeJpo583wjotmhpOtg=",
"ref": "nixos-20.09",
"rev": "647cc06986c1ae4a2bb05298e0cf598723e42970",
"revCount": 245050,
"type": "git",
"url": "https://github.com/NixOS/nixpkgs"
},
"original": {
"ref": "nixos-20.09",
"type": "git",
"url": "https://github.com/NixOS/nixpkgs"
}
},
"root": {
"inputs": {
"cura": "cura",
"materials": "materials",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

69
nixpkgs/cura/flake.nix Normal file
View file

@ -0,0 +1,69 @@
{
inputs.nixpkgs.url = "git+https://github.com/NixOS/nixpkgs?ref=nixos-20.09";
inputs.cura = {
url = "git+https://github.com/Ultimaker/Cura?ref=4.8";
flake = false;
};
inputs.materials = {
url = "git+https://github.com/Ultimaker/fdm_materials?ref=4.8";
flake = false;
};
outputs = { self, ... }@inputs:
let
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
forAllSystems = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f system);
in
rec {
overlay = system: final: prev: let
pkgs = inputs.nixpkgs.legacyPackages."${system}";
in {
cura = pkgs.cura;
# with final; stdenv.mkDerivation {
# name = "cura";
# src = inputs.cura;
# buildInputs = with pkgs.qt5; [ qtbase qtquickcontrols2 qtgraphicaleffects ];
# propagatedBuildInputs = with pkgs.python37.pkgs; [
# libsavitar numpy-stl pyserial requests uranium zeroconf pynest2d
# sentry-sdk trimesh
# ]; # ++ plugins;
# nativeBuildInputs = with pkgs; [ cmake python37.pkgs.wrapPython qt5.wrapQtAppsHook ];
# cmakeFlags = [
# "-DURANIUM_DIR=${python37.pkgs.uranium.src}"
# "-DCURA_VERSION=4.8.0"
# ];
# makeWrapperArgs = [
# # hacky workaround for https://github.com/NixOS/nixpkgs/issues/59901
# "--set OMP_NUM_THREADS 1"
# ];
# postPatch = ''
# sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
# sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py
# '';
# postInstall = ''
# mkdir -p $out/share/cura/resources/materials
# cp ${inputs.materials}/*.fdm_material $out/share/cura/resources/materials/
# mkdir -p $out/lib/cura/plugins
# for plugin in ${toString []}; do
# ln -s $plugin/lib/cura/plugins/* $out/lib/cura/plugins
# done
# '';
# postFixup = ''
# wrapPythonPrograms
# wrapQtApp $out/bin/cura
# '';
# };
};
defaultPackage = forAllSystems (system: (import inputs.nixpkgs {
inherit system;
overlays = [ (self.overlay system) ];
}).cura);
};
}

View file

@ -3,11 +3,11 @@
"emacs": {
"flake": false,
"locked": {
"lastModified": 1607355781,
"narHash": "sha256-ysOH3vbNHLahVHkn0V4XR3XOryoauyeoRuq2gn61YpE=",
"lastModified": 1608749398,
"narHash": "sha256-mEsBoTY4vu4BaLKug7FeptetnndDGIfqovvQ7klFRME=",
"ref": "feature/native-comp",
"rev": "be907b0ba82c2a65e0468d50653cae8a7cf5f16b",
"revCount": 145363,
"rev": "b99a4744822a11e4af098b63db18f54a4e323d58",
"revCount": 145769,
"type": "git",
"url": "https://git.savannah.gnu.org/git/emacs.git"
},
@ -19,11 +19,11 @@
},
"emacs-overlay": {
"locked": {
"lastModified": 1607502287,
"narHash": "sha256-HBthY4A+reSbIppxlwLK/prLUR0UBzmY4HXBjiUZpuI=",
"lastModified": 1608754820,
"narHash": "sha256-Zgsn6sdICFrwfNdy9jkur8XDHZ6nSmc+9rgXRBkA+ik=",
"ref": "master",
"rev": "45cb40f4c573a4805f5e32a3ea7359167dc30b53",
"revCount": 4265,
"rev": "2585a0d0357f23fca934adb759d78c78ed073484",
"revCount": 4369,
"type": "git",
"url": "https://github.com/nix-community/emacs-overlay"
},
@ -34,11 +34,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1607474171,
"narHash": "sha256-hAHjWGeSVN/wG8zb3JOKLuXk/6ynU5a0AkJrDPfOgdw=",
"lastModified": 1608763692,
"narHash": "sha256-TLwIyNZcVn/wOHd77xjbogxrDx+xOSbl6V7AP7wZMrI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4e5fc1ed865139d585ecb92e5091e736cdae3a4e",
"rev": "1d364e5138acf29127539657159e6cf16f47c1ca",
"type": "github"
},
"original": {

View file

@ -52,9 +52,9 @@
"-DUSE_SYSTEM_LIBVTERM=ON"
];
installPhase = ''
mkdir -p $out/lib
install ../vterm-module.so $out/lib
'';
mkdir -p $out/lib
install ../vterm-module.so $out/lib
'';
};
in
rec {
@ -69,7 +69,6 @@
ln -s ${emacs}/bin/emacsclient $out/bin/emacsclient
makeWrapper ${emacs}/bin/emacs $out/bin/emacs --prefix PATH : ${lib.makeBinPath [
nodePackages.pyright
python38Full
nodePackages.typescript-language-server
fira-code
@ -85,7 +84,7 @@
ghostscript
imagemagick
(texlive.combine { inherit (texlive) scheme-small siunitx amsmath ulem dvipng wrapfig cancel capt-of; })
(texlive.combine { inherit (texlive) scheme-small siunitx amsmath ulem dvipng wrapfig cancel capt-of pgfplots; })
texlab
]} --prefix EMACSLOADPATH : ${vtermModule final}/lib:
'';