Skip to content

Commit 31e9643

Browse files
committed
nix: Deduplicate nixpkgs
We can transitively import nixpkgs, this way we remove duplicates.
1 parent 9c32fbb commit 31e9643

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

flake.lock

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

flake.nix

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
description = "Drag and drop your files directly out of the terminal";
33
inputs = {
4-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
54
quartz.url = "github:vimpostor/quartz";
65
};
76

8-
outputs = { self, nixpkgs, quartz }: quartz.lib.eachSystem (system:
7+
outputs = { self, quartz }: quartz.lib.eachSystem (system:
98
let
10-
pkgs = nixpkgs.legacyPackages.${system};
9+
pkgs = quartz.inputs.nixpkgs.legacyPackages.${system};
1110
stdenvs = [ { name = "gcc"; pkg = pkgs.gcc14Stdenv; } { name = "clang"; pkg = pkgs.llvmPackages_18.stdenv; } ];
1211
defaultStdenv = (builtins.head stdenvs).name;
13-
quartz = pkgs.fetchFromGitHub {
12+
quartzCode = pkgs.fetchFromGitHub {
1413
owner = "vimpostor";
1514
repo = "quartz";
1615
rev = builtins.head (builtins.match ".*FetchContent_Declare\\(.*GIT_TAG ([[:alnum:]\\.]+).*" (builtins.readFile ./CMakeLists.txt));
@@ -35,7 +34,7 @@
3534
xorg.xcbutilwm
3635
];
3736

38-
cmakeFlags = [("-DFETCHCONTENT_SOURCE_DIR_QUARTZ=" + quartz)];
37+
cmakeFlags = [("-DFETCHCONTENT_SOURCE_DIR_QUARTZ=" + quartzCode)];
3938
};
4039
in {
4140
packages = {

0 commit comments

Comments
 (0)