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,
|
||||
# so they're listed explicitly.
|
||||
|
||||
# In case of stale checkouts: rm -rf ~/.cache/nix
|
||||
|
||||
build() {
|
||||
echo "$(tput bold)-- Building $*$(tput sgr0)"
|
||||
nix-build --arg local ${LOCAL:-false} "$@"
|
||||
|
||||
@@ -17,12 +17,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
xorg.libXdmcp
|
||||
libpulseaudio
|
||||
dbus.dev
|
||||
] ++ lib.optionals full [
|
||||
python3
|
||||
] ++ lib.optionals (full && stdenv.isLinux) [
|
||||
gnome.gdm.dev
|
||||
glib
|
||||
pcre2
|
||||
systemd.dev
|
||||
] ++ lib.optionals (full && stdenv.isLinux) [
|
||||
|
||||
# To address pkg-config warnings for glib.
|
||||
util-linux
|
||||
libselinux
|
||||
@@ -42,13 +43,9 @@ pkgs.stdenv.mkDerivation rec {
|
||||
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 = [
|
||||
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
|
||||
"-DSETUID="
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
@@ -20,9 +20,11 @@ pkgs.stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
gnome.adwaita-icon-theme
|
||||
gtk3
|
||||
libwebp
|
||||
libraw
|
||||
shared-mime-info
|
||||
|
||||
# WIP
|
||||
libepoxy
|
||||
@@ -74,8 +76,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
"-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 = ''
|
||||
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 ]}
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
# Tests
|
||||
desktop-file-utils
|
||||
] ++ lib.optionals full [
|
||||
librsvg
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
@@ -28,6 +30,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
] ++ lib.optionals full [
|
||||
lua5_3
|
||||
|
||||
libpng
|
||||
xorg.libXft
|
||||
xorg.libXau
|
||||
xorg.libXdmcp
|
||||
|
||||
@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
go
|
||||
nodejs
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# This was broken on Linux.
|
||||
swift
|
||||
];
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
gnome.adwaita-icon-theme
|
||||
gtk3
|
||||
json-glib
|
||||
lua5_2
|
||||
@@ -53,6 +54,15 @@ pkgs.stdenv.mkDerivation rec {
|
||||
"-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;
|
||||
|
||||
checkPhase = with pkgs; ''
|
||||
|
||||
@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
ncurses
|
||||
libiconv
|
||||
libev
|
||||
|
||||
# Termo demo-glib.c
|
||||
|
||||
@@ -13,6 +13,8 @@ pkgs.stdenv.mkDerivation rec {
|
||||
# Tests
|
||||
libxml2
|
||||
desktop-file-utils
|
||||
] ++ lib.optionals full [
|
||||
librsvg
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
@@ -30,6 +32,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
] ++ lib.optionals full [
|
||||
fftw
|
||||
fftwSinglePrec
|
||||
libpng
|
||||
libpulseaudio
|
||||
xorg.libXft
|
||||
xorg.libXau
|
||||
|
||||
@@ -14,7 +14,6 @@ let
|
||||
ncurses
|
||||
inkscape
|
||||
#(groff.override { enableGhostscript = true; })
|
||||
libreoffice
|
||||
imagemagick
|
||||
|
||||
openssl
|
||||
@@ -22,6 +21,9 @@ let
|
||||
nss.tools
|
||||
# pdfsig
|
||||
(poppler.override { utils = true; })
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
# Missing on macOS as of writing.
|
||||
libreoffice
|
||||
];
|
||||
|
||||
src = if local then
|
||||
|
||||
@@ -13,7 +13,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libusb
|
||||
libusb1
|
||||
] ++ lib.optionals full [
|
||||
gtk3
|
||||
|
||||
@@ -54,4 +54,3 @@ pkgs.stdenv.mkDerivation rec {
|
||||
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
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "xK";
|
||||
_pname = "xK";
|
||||
pname = pkgs.lib.strings.toLower _pname;
|
||||
_version = pkgs.lib.strings.fileContents (src + "/xK-version");
|
||||
version = "master";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
@@ -28,20 +30,21 @@ pkgs.stdenv.mkDerivation rec {
|
||||
tcl
|
||||
perl
|
||||
ruby
|
||||
tinycc
|
||||
python3
|
||||
] ++ lib.optionals (full && !tinycc.meta.broken) [
|
||||
tinycc
|
||||
] ++ lib.optionals (!full) [
|
||||
libedit
|
||||
];
|
||||
|
||||
src = if local then
|
||||
builtins.path {
|
||||
path = ../${pname}/git;
|
||||
name = "${pname}";
|
||||
path = ../${_pname}/git;
|
||||
name = "${_pname}";
|
||||
}
|
||||
else
|
||||
fetchGit {
|
||||
url = "https://git.janouch.name/p/${pname}.git";
|
||||
url = "https://git.janouch.name/p/${_pname}.git";
|
||||
submodules = true;
|
||||
ref = "master";
|
||||
};
|
||||
@@ -54,12 +57,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
xP = pkgs.buildGoModule rec {
|
||||
pname = "xP";
|
||||
_pname = "xP";
|
||||
pname = pkgs.lib.strings.toLower _pname;
|
||||
inherit version src doCheck meta;
|
||||
|
||||
modRoot = "./${pname}/";
|
||||
modRoot = "./${_pname}/";
|
||||
# vendorHash = pkgs.lib.fakeHash;
|
||||
vendorHash = "sha256-TK3rivjzYZwG8bfia22iQO5ZKnBzeIidsHNl6jnQUio=";
|
||||
vendorHash = "sha256-feaUOP+joGnpjqniCtstRGHwcMyGNZ95PwEXWzjmjIk=";
|
||||
|
||||
mithril = pkgs.fetchurl {
|
||||
url = "https://unpkg.com/mithril@2.2.3/mithril.js";
|
||||
@@ -84,22 +88,55 @@ pkgs.stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
xS = pkgs.buildGoModule rec {
|
||||
pname = "xS";
|
||||
_pname = "xS";
|
||||
pname = pkgs.lib.strings.toLower _pname;
|
||||
inherit version src doCheck meta;
|
||||
|
||||
modRoot = "./${pname}/";
|
||||
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 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.
|
||||
postInstall = pkgs.lib.optionals full ''
|
||||
makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public
|
||||
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;
|
||||
@@ -107,7 +144,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||
meta = with pkgs.lib; {
|
||||
description = "IRC daemon, bot, TUI client"
|
||||
+ optionals full " and its web frontend";
|
||||
homepage = "https://git.janouch.name/p/${pname}";
|
||||
homepage = "https://git.janouch.name/p/${_pname}";
|
||||
platforms = platforms.all;
|
||||
license = licenses.bsd0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user