Skip to content

Commit b9905ef

Browse files
committed
nix: add overlay
1 parent 2119eb2 commit b9905ef

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

ci/variations.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
clangStdenv,
33
gccStdenv,
44
}: {
5-
clang = { buildStdenv = clangStdenv; };
6-
gcc = { buildStdenv = gccStdenv; };
5+
clang = { stdenv = clangStdenv; };
6+
gcc = { stdenv = gccStdenv; };
77
}

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
lib,
33
nix-gitignore,
44
pkgs,
5+
stdenv,
56
keepDebugInfo,
6-
buildStdenv ? pkgs.clangStdenv,
77

88
pkg-config,
99
cmake,
@@ -44,7 +44,7 @@
4444
withHyprland ? true,
4545
withI3 ? true,
4646
}: let
47-
unwrapped = buildStdenv.mkDerivation {
47+
unwrapped = stdenv.mkDerivation {
4848
pname = "quickshell${lib.optionalString debug "-debug"}";
4949
version = "0.2.0";
5050
src = nix-gitignore.gitignoreSource "/default.nix\n" ./.;

flake.nix

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,28 @@
44
};
55

66
outputs = { self, nixpkgs }: let
7+
overlayPkgs = p: p.appendOverlays [ self.overlays.default ];
8+
79
forEachSystem = fn:
810
nixpkgs.lib.genAttrs
911
nixpkgs.lib.platforms.linux
10-
(system: fn system nixpkgs.legacyPackages.${system});
12+
(system: fn system (overlayPkgs nixpkgs.legacyPackages.${system}));
1113
in {
12-
packages = forEachSystem (system: pkgs: rec {
13-
quickshell = pkgs.callPackage ./default.nix {
14-
gitRev = self.rev or self.dirtyRev;
15-
};
14+
overlays.default = import ./overlay.nix {
15+
rev = self.rev or self.dirtyRev;
16+
};
1617

18+
packages = forEachSystem (system: pkgs: rec {
19+
quickshell = pkgs.quickshell;
1720
default = quickshell;
1821
});
1922

2023
devShells = forEachSystem (system: pkgs: rec {
2124
default = import ./shell.nix {
2225
inherit pkgs;
23-
inherit (self.packages.${system}) quickshell;
26+
quickshell = self.packages.${system}.quickshell.override {
27+
stdenv = pkgs.clangStdenv;
28+
};
2429
};
2530
});
2631
};

overlay.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{ rev ? null }: (final: prev: {
2+
quickshell = final.callPackage ./default.nix {
3+
gitRev = rev;
4+
};
5+
})

shell.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
pkgs ? import <nixpkgs> {},
3-
quickshell ? pkgs.callPackage ./default.nix {},
3+
stdenv ? pkgs.clangStdenv, # faster compiles than gcc
4+
quickshell ? pkgs.callPackage ./default.nix { inherit stdenv; },
45
...
56
}: let
67
tidyfox = import (pkgs.fetchFromGitea {

0 commit comments

Comments
 (0)