Skip to content

Commit 3462200

Browse files
Ericson2314Mic92
authored andcommitted
Format all Nix files
1 parent 6dc6c21 commit 3462200

File tree

3 files changed

+57
-37
lines changed

3 files changed

+57
-37
lines changed

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
1+
(import (fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {
22
src = builtins.fetchGit ./.;
33
}).defaultNix

flake.nix

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,46 @@
33

44
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
55

6-
outputs = { self, nixpkgs }:
6+
outputs =
7+
{ self, nixpkgs }:
78
{
89
overlays.default = final: prev: {
9-
nixos-channel-native-programs = with final; stdenv.mkDerivation {
10-
name = "nixos-channel-native-programs";
11-
buildInputs = [
10+
nixos-channel-native-programs =
11+
with final;
12+
stdenv.mkDerivation {
13+
name = "nixos-channel-native-programs";
14+
buildInputs = [
1215
nix
1316
pkg-config
1417
boehmgc
1518
nlohmann_json
1619
boost
1720
sqlite
18-
];
21+
];
1922

20-
buildCommand = let
21-
nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19";
22-
in ''
23-
mkdir -p $out/bin
23+
buildCommand =
24+
let
25+
nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19";
26+
in
27+
''
28+
mkdir -p $out/bin
2429
25-
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
26-
$(pkg-config --cflags nix-main) \
27-
$(pkg-config --libs nix-main) \
28-
$(pkg-config --libs nix-store) \
29-
-lsqlite3 \
30-
${nixpkgs.lib.optionalString nixHasSignalsHh "-DHAS_SIGNALS_HH"}
31-
'';
32-
};
30+
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
31+
$(pkg-config --cflags nix-main) \
32+
$(pkg-config --libs nix-main) \
33+
$(pkg-config --libs nix-store) \
34+
-lsqlite3 \
35+
${nixpkgs.lib.optionalString nixHasSignalsHh "-DHAS_SIGNALS_HH"}
36+
'';
37+
};
3338

34-
nixos-channel-scripts = with final; stdenv.mkDerivation {
35-
name = "nixos-channel-scripts";
39+
nixos-channel-scripts =
40+
with final;
41+
stdenv.mkDerivation {
42+
name = "nixos-channel-scripts";
3643

37-
buildInputs = with perlPackages;
38-
[ nix
44+
buildInputs = with perlPackages; [
45+
nix
3946
sqlite
4047
makeWrapper
4148
perl
@@ -51,25 +58,38 @@
5158
nix-index
5259
];
5360

54-
buildCommand = ''
55-
mkdir -p $out/bin
61+
buildCommand = ''
62+
mkdir -p $out/bin
5663
57-
cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch
58-
wrapProgram $out/bin/mirror-nixos-branch \
59-
--set PERL5LIB $PERL5LIB \
60-
--set XZ_OPT "-T0" \
61-
--prefix PATH : ${lib.makeBinPath [ wget git nix gnutar xz rsync openssh nix-index nixos-channel-native-programs ]}
64+
cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch
65+
wrapProgram $out/bin/mirror-nixos-branch \
66+
--set PERL5LIB $PERL5LIB \
67+
--set XZ_OPT "-T0" \
68+
--prefix PATH : ${
69+
lib.makeBinPath [
70+
wget
71+
git
72+
nix
73+
gnutar
74+
xz
75+
rsync
76+
openssh
77+
nix-index
78+
nixos-channel-native-programs
79+
]
80+
}
6281
63-
patchShebangs $out/bin
64-
'';
65-
};
82+
patchShebangs $out/bin
83+
'';
84+
};
6685

6786
};
6887

69-
packages.default.x86_64-linux = (import nixpkgs {
70-
system = "x86_64-linux";
71-
overlays = [ self.overlays.default ];
72-
}).nixos-channel-scripts;
88+
packages.default.x86_64-linux =
89+
(import nixpkgs {
90+
system = "x86_64-linux";
91+
overlays = [ self.overlays.default ];
92+
}).nixos-channel-scripts;
7393

7494
checks.x86_64-linux.default = self.packages.default.x86_64-linux;
7595
};

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
1+
(import (fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {
22
src = builtins.fetchGit ./.;
33
}).shellNix

0 commit comments

Comments
 (0)