aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-31 03:45:09 +0000
committerFuwn <[email protected]>2026-01-31 03:45:09 +0000
commit1d3e526809a1fede56683086f94d71494efc5c27 (patch)
treeb571b24ea7b795368d2f1b766cb0fcad11ab134d /flake.nix
parentfeat: Initial commit (diff)
downloadiku-1d3e526809a1fede56683086f94d71494efc5c27.tar.xz
iku-1d3e526809a1fede56683086f94d71494efc5c27.zip
feat: Add Nix flake support
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..1e7f318
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,35 @@
+{
+ description = "Grammar-Aware Go Formatter";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, flake-utils, ... }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+ version = self.shortRev or "dirty";
+ in {
+ packages.default = pkgs.buildGo125Module {
+ inherit version;
+
+ pname = "iku";
+ src = pkgs.lib.cleanSource ./.;
+ vendorHash = null;
+ ldflags = [ "-s" "-w" "-X main.version=${version}" ];
+
+ meta = with pkgs.lib; {
+ description = "Grammar-Aware Go Formatter";
+ homepage = "https://github.com/Fuwn/iku";
+ license = licenses.gpl3Only;
+ platforms = platforms.unix;
+ };
+ };
+
+ devShells.default = pkgs.mkShell {
+ buildInputs = [ pkgs.go_1_25 ];
+ };
+ });
+}