diff options
author | Justin Bedo <cu@cua0.org> | 2024-10-14 10:06:54 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2024-10-14 10:06:54 +1100 |
commit | 62e78dd44e17d26b7b93c6d13ec2894aa507d14a (patch) | |
tree | e8313b62738e867a4cf38e4f8f594f322809b82f | |
parent | 204508bd0db9ac4e4c43798a56f67157c7fc07bc (diff) |
add nix expressions
-rw-r--r-- | default.nix | 20 | ||||
-rw-r--r-- | flake.lock | 26 | ||||
-rw-r--r-- | flake.nix | 10 |
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 ./. {}; + }; +} |