mirror of
https://github.com/eRgo35/dwm.git
synced 2025-12-16 05:46:09 +01:00
feat: nixified
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ dwm-msg
|
|||||||
config.h
|
config.h
|
||||||
patches.h
|
patches.h
|
||||||
.legacy/
|
.legacy/
|
||||||
|
.direnv/
|
||||||
|
|||||||
21
default.nix
21
default.nix
@@ -1,21 +0,0 @@
|
|||||||
{ stdenv, fetchurl, libX11, libXft, libXinerama }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "dwm-HEAD";
|
|
||||||
|
|
||||||
src = builtins.filterSource
|
|
||||||
(path: type: (toString path) != (toString ./.git)) ./.;
|
|
||||||
|
|
||||||
buildInputs = [ libX11 libXft libXinerama ];
|
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
substituteInPlace config.mk --replace '/usr/local' $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Dynamic window manager for X";
|
|
||||||
homepage = http://dwm.suckless.org/;
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
23
flake.lock
generated
Normal file
23
flake.lock
generated
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 0,
|
||||||
|
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||||
|
"path": "/nix/store/8fwsiv0hd7nw1brkvka0jf1frk3m7qkr-source",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
46
flake.nix
Normal file
46
flake.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
outputs = { self, nixpkgs }: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
packages.${system}.dwm = pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "dwm";
|
||||||
|
version = "custom";
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXft
|
||||||
|
xorg.libXinerama
|
||||||
|
];
|
||||||
|
|
||||||
|
makeFlags = [ "CC=${pkgs.gcc}/bin/gcc" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp dwm $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "Dynamic Window Manager";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libX11.dev
|
||||||
|
xorg.libXft
|
||||||
|
xorg.libXinerama
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "Development shell for dwm ready."
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user