aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix20
-rw-r--r--flake.lock26
-rw-r--r--flake.nix10
3 files changed, 56 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..50934b6
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,20 @@
+{stdenv, webkitgtk_4_1, gtk4, pkg-config, wrapGAppsHook4, makeWrapper, glib-networking}:
+stdenv.mkDerivation {
+ name = "rose";
+ src = ./.;
+ nativeBuildInputs = [wrapGAppsHook4 pkg-config makeWrapper];
+ buildInputs = [webkitgtk_4_1.dev gtk4.dev];
+ buildPhase = ''
+ $CC -O2 -o rose rosenrot.c \
+ `pkg-config --cflags webkit2gtk-4.1` \
+ `pkg-config --libs webkit2gtk-4.1`
+ '';
+ installPhase = ''
+ install -m755 -D ./rose $out/bin/rose
+ '';
+ fixupPhase = ''
+ wrapProgram $out/bin/rose \
+ --set "WEBKIT_DISABLE_DMABUF_RENDERER" "1" \
+ --set "GIO_MODULE_DIR" "${glib-networking}/lib/gio/modules/"
+ '';
+}
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..d094404
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,26 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1728860496,
+ "narHash": "sha256-HVDtY+3DjEUQKzx+c3OvZAyw1ZlXGt4Ybh/8X2i4vUY=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "62b5779a925d22372e0a70f87ba2e9e242954569",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..7937fc0
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,10 @@
+{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
+ outputs = {self, nixpkgs}:
+ let
+ system = "x86_64-linux";
+ pkgs = import nixpkgs {inherit system;};
+ in {
+ packages.${system}.default = pkgs.callPackage ./. {};
+ };
+}