commit 8e3a99718fc8e1b114e296521875a6822b417f85 Author: rhiannon morris Date: Fri Dec 13 18:16:33 2024 +0100 first diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..59d449d --- /dev/null +++ b/flake.nix @@ -0,0 +1,9 @@ +{ outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + i-w = nixpkgs.legacyPackages.${system}.callPackage ./inkscape-x11.nix { }; + in { + apps.${system}.default = + { type = "app"; program = "${i-w}/bin/inkscape-xwayland"; }; + }; +} diff --git a/inkscape-x11.nix b/inkscape-x11.nix new file mode 100644 index 0000000..aa1d4bf --- /dev/null +++ b/inkscape-x11.nix @@ -0,0 +1,19 @@ +{ inkscape, stdenv, writeScript }: +stdenv.mkDerivation rec { + pname = "inkscape-xwayland"; + inherit (inkscape) version; + meta.description = "Inkscape but forced to run under XWayland"; + + script = writeScript "inkscape-xwayland" '' + #!/usr/bin/env bash + export GDK_BACKEND=x11 + ${inkscape}/bin/inkscape + ''; + + buildInputs = [ inkscape ]; + dontUnpack = true; dontFixup = true; + installPhase = '' + mkdir -p $out/bin + cp ${script} $out/bin/inkscape-xwayland + ''; +}