]> Skullheadx's Git Forge - dwm.git/commitdiff
add flake
authorSkullheadx <admonty1@protonmail.com>
Wed, 29 Apr 2026 05:55:27 +0000 (01:55 -0400)
committerSkullheadx <admonty1@protonmail.com>
Wed, 29 Apr 2026 05:55:27 +0000 (01:55 -0400)
.gitignore [new file with mode: 0644]
flake.lock [new file with mode: 0644]
flake.nix [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..182551d
--- /dev/null
@@ -0,0 +1,2 @@
+/result
+*.swp
diff --git a/flake.lock b/flake.lock
new file mode 100644 (file)
index 0000000..bbfee60
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "nodes": {
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1777268161,
+        "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
+        "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 (file)
index 0000000..3e96594
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,35 @@
+{
+  description = "flake for building dwm";
+
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+  };
+
+  outputs =
+    { self, nixpkgs }:
+    let
+      system = "x86_64-linux";
+      pkgs = import nixpkgs { inherit system; };
+
+    in
+    {
+      packages.${system}.default = pkgs.stdenv.mkDerivation {
+        pname = "dwm";
+        version = "6.8";
+        src = ./.;
+
+        nativeBuildInputs = [ pkgs.pkg-config ];
+        buildInputs = [
+          pkgs.libX11
+          pkgs.libxinerama
+          pkgs.libxft
+        ];
+
+        makeFlags = [
+          "PREFIX=$(out)"
+          "CC:=$(CC)"
+        ];
+
+      };
+    };
+}