Skip to content

Commit 04e6f90

Browse files
committed
Lots of shit
I swear I'll come back and write better commit messages for these. It's been so long that I don't even know what really changed.
1 parent 2455407 commit 04e6f90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+10251
-768
lines changed

config.nix

+7-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
{ allowUnfree = true; }
1+
{
2+
allowUnfree = true;
3+
android_sdk.accept_license = true;
4+
permittedInsecurePackages = [
5+
"openssl-1.0.2u"
6+
];
7+
}

drvs/aerc.nix

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{ stdenv
2+
, buildGoModule
3+
, fetchpatch
4+
, go
5+
, ncurses
6+
, scdoc
7+
, python3
8+
, w3m
9+
, dante
10+
}:
11+
let
12+
rev = "35402e21d9b75f0d0a3a4efb8b552e1c9a2e6d59";
13+
in
14+
buildGoModule rec {
15+
pname = "aerc";
16+
version = "unstable-2020-03-26";
17+
18+
src = fetchTarball {
19+
url = "https://git.sr.ht/~sircmpwn/aerc/archive/${rev}.tar.gz";
20+
sha256 = "0xm540zcaz6f3fnp1pdc9wk8zlnksnhaqcdh51mfcm6d7biy0pcp";
21+
};
22+
23+
modSha256 = "048jx502h7jw8ksqijz6r3dffj8v2h168za5qazva6fcn33kp0gw";
24+
25+
nativeBuildInputs = [
26+
go
27+
scdoc
28+
python3.pkgs.wrapPython
29+
];
30+
31+
patches = [
32+
(
33+
fetchpatch {
34+
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/cb8aa201e26551b2d6d9c2d11b4f9bbf593ac129/pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch";
35+
sha256 = "1m3mx2cp8w735hb5j712y2s9a0mvvi7w14gmysy7cxk88lfgs46i";
36+
}
37+
)
38+
];
39+
40+
pythonPath = [
41+
python3.pkgs.colorama
42+
];
43+
44+
buildInputs = [ python3 ];
45+
46+
buildPhase = "
47+
runHook preBuild
48+
# we use make instead of go build
49+
runHook postBuild
50+
";
51+
52+
installPhase = ''
53+
runHook preInstall
54+
make PREFIX=$out install
55+
wrapPythonProgramsIn $out/share/aerc/filters "$out $pythonPath"
56+
runHook postInstall
57+
'';
58+
59+
postFixup = ''
60+
wrapProgram $out/bin/aerc --prefix PATH ":" \
61+
"$out/share/aerc/filters:${stdenv.lib.makeBinPath [ ncurses ]}"
62+
wrapProgram $out/share/aerc/filters/html --prefix PATH ":" \
63+
${stdenv.lib.makeBinPath [ w3m dante ]}
64+
'';
65+
}

drvs/alacritty.nix

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{ lib
2+
, callPackage
3+
, makeWrapper
4+
, installShellFiles
5+
6+
, expat
7+
, fontconfig
8+
, freetype
9+
, libGL
10+
, libX11
11+
, libXcursor
12+
, libXi
13+
, libXrandr
14+
, libXxf86vm
15+
, libxcb
16+
, libxkbcommon
17+
, wayland
18+
19+
, gzip
20+
, pkgconfig
21+
, python3
22+
, xdg_utils
23+
, releaseBuild ? true
24+
}:
25+
let
26+
src = toString ~/workspace/vcs/alacritty;
27+
sources = import <vin/nix/sources.nix>;
28+
naersk = callPackage sources.naersk {};
29+
gitignoreSource = (callPackage sources.gitignore {}).gitignoreSource;
30+
commitHash = with lib; substring 0 8 (commitIdFromGitRepo "${src}/.git");
31+
32+
rpathLibs = [
33+
expat
34+
fontconfig
35+
freetype
36+
libGL
37+
libX11
38+
libXcursor
39+
libXi
40+
libXrandr
41+
libXxf86vm
42+
libxcb
43+
libxkbcommon
44+
wayland
45+
];
46+
in
47+
(
48+
naersk.buildPackage {
49+
name = "alacritty";
50+
version = commitHash;
51+
root = gitignoreSource src;
52+
buildInputs = [
53+
makeWrapper
54+
installShellFiles
55+
gzip
56+
pkgconfig
57+
python3
58+
] ++ rpathLibs;
59+
cargoOptions = (opts: opts ++ [ "--locked" ]);
60+
release = releaseBuild;
61+
doCheck = false;
62+
}
63+
).overrideAttrs (
64+
_: {
65+
postPatch = ''
66+
substituteInPlace alacritty/src/config/mouse.rs \
67+
--replace xdg-open ${xdg_utils}/bin/xdg-open
68+
69+
sed -i 's@let hash =.*@let hash = "${commitHash}";@' \
70+
alacritty/build.rs
71+
'';
72+
73+
installPhase = ''
74+
runHook preInstall
75+
76+
install -D target/${if releaseBuild then "release" else "debug"}/alacritty $out/bin/alacritty
77+
78+
install -D extra/linux/Alacritty.desktop -t $out/share/applications/
79+
install -D extra/logo/alacritty-term.svg $out/share/icons/hicolor/scalable/apps/Alacritty.svg
80+
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
81+
82+
installShellCompletion --zsh extra/completions/_alacritty
83+
installShellCompletion extra/completions/alacritty.{fish,bash}
84+
85+
install -dm 755 "$out/share/man/man1"
86+
gzip -c extra/alacritty.man > "$out/share/man/man1/alacritty.1.gz"
87+
88+
runHook postInstall
89+
'';
90+
91+
dontPatchELF = true; # we already did it :)
92+
}
93+
)

drvs/bemenu.nix

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{ stdenv
2+
, lib
3+
, fetchFromGitHub
4+
, cairo
5+
, libxkbcommon
6+
, pango
7+
, fribidi
8+
, harfbuzz
9+
, pcre
10+
, pkgconfig
11+
, ncursesSupport ? true
12+
, ncurses ? null
13+
, waylandSupport ? true
14+
, wayland ? null
15+
, wayland-protocols ? null
16+
, x11Support ? true
17+
, xlibs ? null
18+
, xorg ? null
19+
}:
20+
21+
assert ncursesSupport -> ncurses != null;
22+
assert waylandSupport -> wayland != null && wayland-protocols != null;
23+
assert x11Support -> xlibs != null && xorg != null;
24+
25+
stdenv.mkDerivation rec {
26+
pname = "bemenu";
27+
version = "2020-03-19";
28+
29+
src = fetchFromGitHub {
30+
owner = "Cloudef";
31+
repo = pname;
32+
rev = "cd53b7bb555cf1c5afaae3779a88e126571faf8c";
33+
sha256 = "0hkv9w5zka5sjby3qhkjip5h9xhah4ay5sf2bzwmiffyldcg2gml";
34+
};
35+
36+
nativeBuildInputs = [
37+
pkgconfig
38+
pcre
39+
];
40+
41+
buildInputs = with lib; [
42+
cairo
43+
fribidi
44+
harfbuzz
45+
libxkbcommon
46+
pango
47+
] ++ optionals ncursesSupport [
48+
ncurses
49+
]
50+
++ optionals waylandSupport [
51+
wayland
52+
wayland-protocols
53+
]
54+
++ optionals x11Support [
55+
xlibs.libX11
56+
xlibs.libXinerama
57+
xlibs.libXft
58+
xorg.libXdmcp
59+
xorg.libpthreadstubs
60+
xorg.libxcb
61+
];
62+
63+
PREFIX = placeholder "out";
64+
65+
buildPhase = ''
66+
make clients ${lib.optionalString ncursesSupport "curses"} \
67+
${lib.optionalString x11Support "x11"} ${lib.optionalString waylandSupport "wayland"}
68+
'';
69+
70+
installPhase = ''
71+
mkdir -p $out
72+
make install
73+
'';
74+
}

drvs/chatterino2.nix

-40
This file was deleted.

drvs/doom-emacs

drvs/doom-emacs.nix

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
{ stdenv }:
2-
1+
{ stdenv
2+
, callPackage
3+
}:
4+
let
5+
sources = import <vin/nix/sources.nix>;
6+
gitignoreSource = (callPackage sources.gitignore {}).gitignoreSource;
7+
in
38
stdenv.mkDerivation {
49
pname = "doom-emacs";
510
version = "git";
611

7-
src = ./doom-emacs; # submodule :)
12+
src = gitignoreSource ./doom-emacs; # git submodule :)
813

914
outputs = [ "out" "bin" ];
10-
1115
phases = [ "installPhase" ];
16+
1217
installPhase = ''
1318
mkdir -p $out/share/doom-emacs
1419
cp -r $src/* $out/share/doom-emacs

drvs/fish/cgitc.nix

+31-27
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
11
{ lib, fetchFromGitHub }:
2-
2+
with lib;
33
let
4-
cgitcAbbrs = builtins.readFile (fetchFromGitHub {
5-
owner = "simnalamburt";
6-
repo = "cgitc";
7-
rev = "0adb83f765e17dea0fffb83cbdfb576da1400c09";
8-
sha256 = "0yicd77kphm9xxpcr70wig4rmx68i1byz9ibirk27m9z0s657n1m";
9-
} + "/abbreviations");
4+
cgitcAbbrs = builtins.readFile (
5+
fetchFromGitHub {
6+
owner = "simnalamburt";
7+
repo = "cgitc";
8+
rev = "0adb83f765e17dea0fffb83cbdfb576da1400c09";
9+
sha256 = "0yicd77kphm9xxpcr70wig4rmx68i1byz9ibirk27m9z0s657n1m";
10+
} + "/abbreviations"
11+
);
1012

11-
filterComments = with lib;
12-
abbrString:
13-
builtins.filter (f: f != "" && f != " ")
14-
(forEach (flatten (builtins.split "\n" abbrString)) (x:
15-
if hasPrefix "#" x then
16-
""
17-
else if hasInfix "#" x then
18-
if hasInfix " #" x then
19-
builtins.elemAt (builtins.split " #" x) 0
13+
filterComments = abbrString: builtins.filter (f: f != "" && f != " ") (
14+
forEach (flatten (builtins.split "\n" abbrString)) (
15+
x:
16+
if hasPrefix "#" x then
17+
""
18+
else if hasInfix "#" x then
19+
if hasInfix " #" x then
20+
builtins.elemAt (builtins.split " #" x) 0
21+
else
22+
builtins.elemAt (builtins.split "#" x) 0
2023
else
21-
builtins.elemAt (builtins.split "#" x) 0
22-
else
23-
x));
24+
x
25+
)
26+
);
2427

25-
stripLeadingWhitespace = with lib;
26-
string:
28+
stripLeadingWhitespace = string:
2729
let
2830
recurse = s:
29-
let newString = removePrefix " " s;
31+
let
32+
newString = removePrefix " " s;
3033
in if hasPrefix " " newString then recurse newString else newString;
3134
in recurse string;
3235

33-
abbrsToFish = with lib;
34-
abbrList:
35-
forEach abbrList (x:
36+
abbrsToFish = abbrList: forEach abbrList (
37+
x:
3638
let
3739
len = builtins.stringLength (builtins.elemAt (builtins.split " " x) 0);
3840
abbr = builtins.substring 0 len x;
3941
contents = stripLeadingWhitespace
4042
(builtins.substring (len + 1) (builtins.stringLength x) x);
41-
in { ${abbr} = "${contents}"; });
43+
in { ${abbr} = "${contents}"; }
44+
);
4245

4346
abbrevs = abbrsToFish (filterComments cgitcAbbrs);
44-
in { abbrs = builtins.foldl' (x: y: x // y) { } abbrevs; }
47+
in
48+
{ abbrs = builtins.foldl' (x: y: x // y) {} abbrevs; }

0 commit comments

Comments
 (0)