diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cc5c8c8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1759381078, + "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "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..8a5040e --- /dev/null +++ b/flake.nix @@ -0,0 +1,74 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + outputs = + { self, nixpkgs }: + { + packages.x86_64-linux.default = self.packages.x86_64-linux.reflection; + packages.x86_64-linux.reflection = nixpkgs.legacyPackages.x86_64-linux.callPackage ( + { + lib, + stdenv, + cargo, + desktop-file-utils, + meson, + ninja, + pkg-config, + rustc, + wrapGAppsHook4, + rustPlatform, + gtk4, + gtksourceview5, + libadwaita, + libpanel, + vte-gtk4, + glib, + openssl, + }: + stdenv.mkDerivation rec { + pname = "reflection"; + version = "0-unstable-2025-10-06"; + + src = ./.; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit pname version src; + hash = "sha256-efiraQp0m+DXZoQPtWQn3vIDfMOk/hJ9lEx/x4s9WtI="; + }; + + PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig"; + + nativeBuildInputs = [ + desktop-file-utils + glib + gtk4 + meson + ninja + pkg-config + rustPlatform.cargoSetupHook + cargo + rustc + wrapGAppsHook4 + ]; + + buildInputs = [ + gtk4 + gtksourceview5 + libadwaita + libpanel + vte-gtk4 + ]; + + meta = { + description = "Collaborative, local-first GTK text editor"; + homepage = "https://github.com/p2panda/reflection"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; + mainProgram = "reflection"; + }; + + } + ) { }; + }; +}