Skip to content

Commit b719a7b

Browse files
NotAShelfDuckonaut
authored andcommitted
nix: clean up flake and ignore nix build artifact
1 parent 163a0e7 commit b719a7b

File tree

4 files changed

+49
-14
lines changed

4 files changed

+49
-14
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ build/
22
.cache/
33
*.so
44
compile_flags.txt
5+
result/

flake.lock

+17-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+31-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
11
{
22
inputs = {
33
hyprland.url = "github:hyprwm/Hyprland";
4+
nix-filter.url = "github:numtide/nix-filter";
45
};
56

6-
outputs = { self, hyprland, ... }: let
7+
outputs = {
8+
self,
9+
hyprland,
10+
nix-filter,
11+
...
12+
}: let
713
inherit (hyprland.inputs) nixpkgs;
8-
hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
14+
forHyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
915
in {
10-
packages = hyprlandSystems (system: pkgs: rec {
16+
packages = forHyprlandSystems (system: pkgs: rec {
1117
split-monitor-workspaces = pkgs.stdenv.mkDerivation {
1218
pname = "split-monitor-workspaces";
1319
version = "0.1";
14-
src = ./.;
20+
src = nix-filter.lib {
21+
root = ./.;
22+
include = [
23+
"src"
24+
"include"
25+
./Makefile
26+
./meson.build
27+
];
28+
};
29+
30+
# allow overriding xwayland support
31+
BUILT_WITH_NOXWAYLAND = false;
1532

16-
nativeBuildInputs = with pkgs; [ meson ninja pkg-config ];
33+
nativeBuildInputs = with pkgs; [meson ninja pkg-config];
1734

18-
buildInputs = with pkgs; [
19-
hyprland.packages.${system}.hyprland.dev
20-
pango
21-
cairo
22-
] ++ hyprland.packages.${system}.hyprland.buildInputs;
35+
buildInputs = with pkgs;
36+
[
37+
hyprland.packages.${system}.hyprland.dev
38+
pango
39+
cairo
40+
]
41+
++ hyprland.packages.${system}.hyprland.buildInputs;
2342

2443
meta = with pkgs.lib; {
2544
homepage = "https://github.com/Duckonaut/split-monitor-workspaces";
@@ -32,7 +51,7 @@
3251
default = split-monitor-workspaces;
3352
});
3453

35-
devShells = hyprlandSystems (system: pkgs: {
54+
devShells = forHyprlandSystems (system: pkgs: {
3655
default = pkgs.mkShell {
3756
name = "split-monitor-workspaces";
3857

@@ -41,7 +60,7 @@
4160
bear
4261
];
4362

44-
inputsFrom = [ self.packages.${system}.split-monitor-workspaces ];
63+
inputsFrom = [self.packages.${system}.split-monitor-workspaces];
4564
};
4665
});
4766
};

result

-1
This file was deleted.

0 commit comments

Comments
 (0)