Compare commits
12 Commits
8e0826b8b3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
af116224d4
|
|||
|
7e488f71f8
|
|||
|
dd3dca74c0
|
|||
|
742455838e
|
|||
|
ac7a789e5e
|
|||
|
af24a4ea4c
|
|||
|
9bf1b20046
|
|||
|
87588c12cd
|
|||
|
b72b93128b
|
|||
|
02f1912055
|
|||
|
e747c8f084
|
|||
|
d460bbda07
|
@@ -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} "$@"
|
||||||
|
|||||||
@@ -43,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,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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -63,7 +63,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
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";
|
||||||
@@ -108,10 +108,35 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user