Compare commits
19 Commits
a0e88fb445
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
af116224d4
|
|||
|
7e488f71f8
|
|||
|
dd3dca74c0
|
|||
|
742455838e
|
|||
|
ac7a789e5e
|
|||
|
af24a4ea4c
|
|||
|
9bf1b20046
|
|||
|
87588c12cd
|
|||
|
b72b93128b
|
|||
|
02f1912055
|
|||
|
e747c8f084
|
|||
|
d460bbda07
|
|||
|
8e0826b8b3
|
|||
|
8a97713fa1
|
|||
|
d91b0b04ab
|
|||
|
4bb96d49ef
|
|||
|
3bbb7d522a
|
|||
|
58c2c19d9f
|
|||
|
40cab414cf
|
@@ -3,6 +3,8 @@
|
|||||||
# in all available configurations--Nix introspection is a bit complicated,
|
# in all available configurations--Nix introspection is a bit complicated,
|
||||||
# so they're listed explicitly.
|
# so they're listed explicitly.
|
||||||
|
|
||||||
|
# In case of stale checkouts: rm -rf ~/.cache/nix
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
echo "$(tput bold)-- Building $*$(tput sgr0)"
|
echo "$(tput bold)-- Building $*$(tput sgr0)"
|
||||||
nix-build --arg local ${LOCAL:-false} "$@"
|
nix-build --arg local ${LOCAL:-false} "$@"
|
||||||
|
|||||||
@@ -17,12 +17,13 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
xorg.libXdmcp
|
xorg.libXdmcp
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
dbus.dev
|
dbus.dev
|
||||||
] ++ lib.optionals full [
|
python3
|
||||||
|
] ++ lib.optionals (full && stdenv.isLinux) [
|
||||||
gnome.gdm.dev
|
gnome.gdm.dev
|
||||||
glib
|
glib
|
||||||
pcre2
|
pcre2
|
||||||
systemd.dev
|
systemd.dev
|
||||||
] ++ lib.optionals (full && stdenv.isLinux) [
|
|
||||||
# To address pkg-config warnings for glib.
|
# To address pkg-config warnings for glib.
|
||||||
util-linux
|
util-linux
|
||||||
libselinux
|
libselinux
|
||||||
@@ -42,13 +43,9 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
ref = "master";
|
ref = "master";
|
||||||
};
|
};
|
||||||
|
|
||||||
# It's a weird mess, gdm.pc.in includes the subdirectory in includedir.
|
|
||||||
patchPhase = ''
|
|
||||||
sed -i 's|gdm-user-switching.h>|gdm/&|' gdm-switch-user.c
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
|
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
|
||||||
|
"-DSETUID="
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
gnome.adwaita-icon-theme
|
||||||
gtk3
|
gtk3
|
||||||
libwebp
|
libwebp
|
||||||
libraw
|
libraw
|
||||||
|
shared-mime-info
|
||||||
|
|
||||||
# WIP
|
# WIP
|
||||||
libepoxy
|
libepoxy
|
||||||
@@ -74,8 +76,13 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
"-Dresvg=enabled"
|
"-Dresvg=enabled"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# See nixpkgs commit b1e73fa2e086f1033a33d93524ae2a1781d12b95 about icons.
|
||||||
|
# It might make sense to name {hicolor,gnome.adwaita}-icon-theme/share
|
||||||
|
# explicitly, to limit undesired dependencies.
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
||||||
|
--prefix XDG_DATA_DIRS : "${pkgs.shared-mime-info}/share"
|
||||||
--prefix PATH : $out/bin:${pkgs.lib.makeBinPath [ pkgs.exiftool ]}
|
--prefix PATH : $out/bin:${pkgs.lib.makeBinPath [ pkgs.exiftool ]}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
|
] ++ lib.optionals full [
|
||||||
|
librsvg
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
@@ -28,6 +30,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
] ++ lib.optionals full [
|
] ++ lib.optionals full [
|
||||||
lua5_3
|
lua5_3
|
||||||
|
|
||||||
|
libpng
|
||||||
xorg.libXft
|
xorg.libXft
|
||||||
xorg.libXau
|
xorg.libXau
|
||||||
xorg.libXdmcp
|
xorg.libXdmcp
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
go
|
go
|
||||||
nodejs
|
nodejs
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
# This was broken on Linux.
|
||||||
swift
|
swift
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
gnome.adwaita-icon-theme
|
||||||
gtk3
|
gtk3
|
||||||
json-glib
|
json-glib
|
||||||
lua5_2
|
lua5_2
|
||||||
@@ -53,6 +54,15 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
"-DBUILD_TESTING=ON"
|
"-DBUILD_TESTING=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# See nixpkgs commit b1e73fa2e086f1033a33d93524ae2a1781d12b95 about icons.
|
||||||
|
# It might make sense to name {hicolor,gnome.adwaita}-icon-theme/share
|
||||||
|
# explicitly, to limit undesired dependencies.
|
||||||
|
preFixup = ''
|
||||||
|
gappsWrapperArgs+=(
|
||||||
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
checkPhase = with pkgs; ''
|
checkPhase = with pkgs; ''
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
ncurses
|
ncurses
|
||||||
|
libiconv
|
||||||
libev
|
libev
|
||||||
|
|
||||||
# Termo demo-glib.c
|
# Termo demo-glib.c
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
# Tests
|
# Tests
|
||||||
libxml2
|
libxml2
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
|
] ++ lib.optionals full [
|
||||||
|
librsvg
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
@@ -30,6 +32,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
] ++ lib.optionals full [
|
] ++ lib.optionals full [
|
||||||
fftw
|
fftw
|
||||||
fftwSinglePrec
|
fftwSinglePrec
|
||||||
|
libpng
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
xorg.libXft
|
xorg.libXft
|
||||||
xorg.libXau
|
xorg.libXau
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ let
|
|||||||
ncurses
|
ncurses
|
||||||
inkscape
|
inkscape
|
||||||
#(groff.override { enableGhostscript = true; })
|
#(groff.override { enableGhostscript = true; })
|
||||||
libreoffice
|
|
||||||
imagemagick
|
imagemagick
|
||||||
|
|
||||||
openssl
|
openssl
|
||||||
@@ -22,6 +21,9 @@ let
|
|||||||
nss.tools
|
nss.tools
|
||||||
# pdfsig
|
# pdfsig
|
||||||
(poppler.override { utils = true; })
|
(poppler.override { utils = true; })
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
# Missing on macOS as of writing.
|
||||||
|
libreoffice
|
||||||
];
|
];
|
||||||
|
|
||||||
src = if local then
|
src = if local then
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
libusb
|
libusb1
|
||||||
] ++ lib.optionals full [
|
] ++ lib.optionals full [
|
||||||
gtk3
|
gtk3
|
||||||
|
|
||||||
@@ -54,4 +54,3 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
license = licenses.bsd0;
|
license = licenses.bsd0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
46
usb-drivers-master.nix
Normal file
46
usb-drivers-master.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> { }
|
||||||
|
, local ? false
|
||||||
|
, full ? true
|
||||||
|
}:
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "usb-drivers";
|
||||||
|
version = "master";
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
help2man
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
librsvg
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
libusb1
|
||||||
|
hidapi
|
||||||
|
];
|
||||||
|
|
||||||
|
src = if local then
|
||||||
|
builtins.path {
|
||||||
|
path = ../${pname}/git;
|
||||||
|
name = "${pname}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fetchGit {
|
||||||
|
url = "https://git.janouch.name/p/${pname}.git";
|
||||||
|
submodules = true;
|
||||||
|
ref = "master";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DSETUID="
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "User space USB drivers";
|
||||||
|
homepage = "https://git.janouch.name/p/${pname}";
|
||||||
|
platforms = platforms.all;
|
||||||
|
license = licenses.bsd0;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,7 +3,9 @@
|
|||||||
, full ? true
|
, full ? true
|
||||||
}:
|
}:
|
||||||
pkgs.stdenv.mkDerivation rec {
|
pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "xK";
|
_pname = "xK";
|
||||||
|
pname = pkgs.lib.strings.toLower _pname;
|
||||||
|
_version = pkgs.lib.strings.fileContents (src + "/xK-version");
|
||||||
version = "master";
|
version = "master";
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
@@ -28,20 +30,21 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
tcl
|
tcl
|
||||||
perl
|
perl
|
||||||
ruby
|
ruby
|
||||||
tinycc
|
|
||||||
python3
|
python3
|
||||||
|
] ++ lib.optionals (full && !tinycc.meta.broken) [
|
||||||
|
tinycc
|
||||||
] ++ lib.optionals (!full) [
|
] ++ lib.optionals (!full) [
|
||||||
libedit
|
libedit
|
||||||
];
|
];
|
||||||
|
|
||||||
src = if local then
|
src = if local then
|
||||||
builtins.path {
|
builtins.path {
|
||||||
path = ../${pname}/git;
|
path = ../${_pname}/git;
|
||||||
name = "${pname}";
|
name = "${_pname}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fetchGit {
|
fetchGit {
|
||||||
url = "https://git.janouch.name/p/${pname}.git";
|
url = "https://git.janouch.name/p/${_pname}.git";
|
||||||
submodules = true;
|
submodules = true;
|
||||||
ref = "master";
|
ref = "master";
|
||||||
};
|
};
|
||||||
@@ -54,12 +57,13 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
xP = pkgs.buildGoModule rec {
|
xP = pkgs.buildGoModule rec {
|
||||||
pname = "xP";
|
_pname = "xP";
|
||||||
|
pname = pkgs.lib.strings.toLower _pname;
|
||||||
inherit version src doCheck meta;
|
inherit version src doCheck meta;
|
||||||
|
|
||||||
modRoot = "./${pname}/";
|
modRoot = "./${_pname}/";
|
||||||
# vendorHash = pkgs.lib.fakeHash;
|
# vendorHash = pkgs.lib.fakeHash;
|
||||||
vendorHash = "sha256-TK3rivjzYZwG8bfia22iQO5ZKnBzeIidsHNl6jnQUio=";
|
vendorHash = "sha256-feaUOP+joGnpjqniCtstRGHwcMyGNZ95PwEXWzjmjIk=";
|
||||||
|
|
||||||
mithril = pkgs.fetchurl {
|
mithril = pkgs.fetchurl {
|
||||||
url = "https://unpkg.com/mithril@2.2.3/mithril.js";
|
url = "https://unpkg.com/mithril@2.2.3/mithril.js";
|
||||||
@@ -84,22 +88,55 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
xS = pkgs.buildGoModule rec {
|
xS = pkgs.buildGoModule rec {
|
||||||
pname = "xS";
|
_pname = "xS";
|
||||||
|
pname = pkgs.lib.strings.toLower _pname;
|
||||||
inherit version src doCheck meta;
|
inherit version src doCheck meta;
|
||||||
|
|
||||||
modRoot = "./${pname}/";
|
modRoot = "./${_pname}/";
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
|
|
||||||
# This invokes a premature build that may miss compiler flags.
|
# This invokes a premature build that may miss compiler flags.
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
make
|
make
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
ldflags = [ "-X 'main.projectVersion=${_version}'" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/man/man1
|
||||||
|
mv xS.1 $out/share/man/man1
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xN = pkgs.buildGoModule rec {
|
||||||
|
_pname = "xN";
|
||||||
|
pname = pkgs.lib.strings.toLower _pname;
|
||||||
|
inherit version src doCheck meta;
|
||||||
|
|
||||||
|
modRoot = "./${_pname}/";
|
||||||
|
vendorHash = null;
|
||||||
|
|
||||||
|
# This invokes a premature build that may miss compiler flags.
|
||||||
|
preBuild = ''
|
||||||
|
make
|
||||||
|
'';
|
||||||
|
|
||||||
|
ldflags = [ "-X 'main.projectVersion=${_version}'" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/man/man1
|
||||||
|
mv xN.1 $out/share/man/man1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ignoring xA, as it is huge, and already checked through CI.
|
||||||
|
|
||||||
# While we can't include them in this derivation, we can link to them.
|
# While we can't include them in this derivation, we can link to them.
|
||||||
postInstall = pkgs.lib.optionals full ''
|
postInstall = pkgs.lib.optionals full ''
|
||||||
makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public
|
makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public
|
||||||
makeWrapper ${xS}/bin/xS $out/bin/xS
|
makeWrapper ${xS}/bin/xS $out/bin/xS
|
||||||
|
makeWrapper ${xN}/bin/xN $out/bin/xN
|
||||||
|
ln -s ${xS}/share/man/man1/* ${xN}/share/man/man1/* $out/share/man/man1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
@@ -107,7 +144,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
meta = with pkgs.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "IRC daemon, bot, TUI client"
|
description = "IRC daemon, bot, TUI client"
|
||||||
+ optionals full " and its web frontend";
|
+ optionals full " and its web frontend";
|
||||||
homepage = "https://git.janouch.name/p/${pname}";
|
homepage = "https://git.janouch.name/p/${_pname}";
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
license = licenses.bsd0;
|
license = licenses.bsd0;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user