Skip to content

Commit 8d9c5d7

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

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
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: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
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

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)