Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
@@ -13,4 +13,5 @@
|
|||||||
"vagrant"
|
"vagrant"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
environment.loginShell = "${pkgs.xonsh}/bin/xonsh";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,20 @@ in
|
|||||||
./firefox.nix
|
./firefox.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
# These packages are Linux only
|
||||||
|
home.packages = with pkgs; ( excludes ["x86_64-darwin" "aarch64-darwin"]
|
||||||
|
[
|
||||||
cdrtools
|
cdrtools
|
||||||
dconf2nix
|
|
||||||
vlc
|
vlc
|
||||||
x265
|
x265
|
||||||
] ++
|
]) ++
|
||||||
|
|
||||||
# Items that cannot be outside of x86_64-linux at all
|
# x86_64-linux only
|
||||||
( excludes ["x86_64-darwin" "aarch64-darwin" "aarch64-linux"]
|
( excludes ["x86_64-darwin" "aarch64-darwin" "aarch64-linux"]
|
||||||
[
|
[
|
||||||
|
bitwarden
|
||||||
endeavour
|
endeavour
|
||||||
|
gnucash
|
||||||
jellyfin-media-player
|
jellyfin-media-player
|
||||||
libreoffice
|
libreoffice
|
||||||
logseq
|
logseq
|
||||||
@@ -32,8 +35,8 @@ in
|
|||||||
# Items that are not supported on ARM/Linux
|
# Items that are not supported on ARM/Linux
|
||||||
( excludes ["aarch64-linux"]
|
( excludes ["aarch64-linux"]
|
||||||
[
|
[
|
||||||
bitwarden
|
|
||||||
onlyoffice-bin
|
onlyoffice-bin
|
||||||
|
synology-drive-client
|
||||||
zoom-us
|
zoom-us
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -12,7 +12,6 @@
|
|||||||
./direnv.nix
|
./direnv.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./templates.nix
|
|
||||||
./vim.nix
|
./vim.nix
|
||||||
./xonsh.nix
|
./xonsh.nix
|
||||||
./hosts/${host}
|
./hosts/${host}
|
||||||
@@ -36,7 +35,6 @@
|
|||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bitwarden-cli
|
bitwarden-cli
|
||||||
busybox
|
|
||||||
copier
|
copier
|
||||||
diffutils
|
diffutils
|
||||||
findutils
|
findutils
|
||||||
@@ -57,5 +55,8 @@
|
|||||||
tree
|
tree
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
];
|
] ++ ( if pkgs.system == "x86_64-linux" || pkgs.system == "aarch64-linux" then
|
||||||
|
# Linux-only packages here
|
||||||
|
[
|
||||||
|
] else []);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
imports = [
|
||||||
gimp
|
../../vscodium.nix
|
||||||
gnucash
|
|
||||||
ffmpeg
|
|
||||||
handbrake
|
|
||||||
libtheora
|
|
||||||
makemkv
|
|
||||||
synology-drive-client
|
|
||||||
vagrant
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../../vscodium.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
brew
|
brew
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# Put home configuration here that will affect most boxes
|
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
pkgs.cookiecutter
|
|
||||||
];
|
|
||||||
}
|
|
||||||
+1
-38
@@ -27,43 +27,6 @@ in
|
|||||||
pyright
|
pyright
|
||||||
];
|
];
|
||||||
|
|
||||||
#programs.neovim = {
|
|
||||||
# enable = true;
|
|
||||||
# viAlias = true;
|
|
||||||
# vimAlias = true;
|
|
||||||
# vimdiffAlias = true;
|
|
||||||
# plugins = with pkgs.vimPlugins; [
|
|
||||||
# ansible-vim
|
|
||||||
# bufexplorer
|
|
||||||
#
|
|
||||||
# #cmp-nvim-lsp
|
|
||||||
# #cmp-vsnip
|
|
||||||
# #nvim-lspconfig
|
|
||||||
# nvim-cmp
|
|
||||||
#
|
|
||||||
# jedi-vim
|
|
||||||
#
|
|
||||||
# context-vim
|
|
||||||
# direnv-vim
|
|
||||||
# fzf-vim
|
|
||||||
# nerdtree
|
|
||||||
# nvim-notify
|
|
||||||
# vim-airline
|
|
||||||
# vim-gitgutter
|
|
||||||
# vim-flake8
|
|
||||||
# vim-fugitive
|
|
||||||
# vim-indent-guides
|
|
||||||
# vim-packer
|
|
||||||
# vim-rooter
|
|
||||||
# vim-xonsh
|
|
||||||
# gruvbox
|
|
||||||
# ];
|
|
||||||
# extraLuaConfig = builtins.readFile ./init.lua;
|
|
||||||
# coc = {
|
|
||||||
# # Currently waiting on resolution of https://github.com/NixOS/nixpkgs/issues/236560
|
|
||||||
# enable = false;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
programs.nixneovim = {
|
programs.nixneovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
colorscheme = "gruvbox";
|
colorscheme = "gruvbox";
|
||||||
@@ -135,7 +98,7 @@ in
|
|||||||
nerdtree
|
nerdtree
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
|
|
||||||
jedi-vim
|
#jedi-vim
|
||||||
|
|
||||||
context-vim
|
context-vim
|
||||||
direnv-vim
|
direnv-vim
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gopls
|
||||||
|
];
|
||||||
|
|
||||||
|
# An alternative editor to vim, when I need it for some things
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.vscodium;
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
golang.go
|
||||||
|
ms-python.python
|
||||||
|
vscjava.vscode-java-test
|
||||||
|
vscjava.vscode-java-dependency
|
||||||
|
vscjava.vscode-java-debug
|
||||||
|
vscodevim.vim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
+1
-1
@@ -37,7 +37,7 @@
|
|||||||
cci = "./scripts/circleci-checks.py";
|
cci = "./scripts/circleci-checks.py";
|
||||||
cgh = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/compass\" gh";
|
cgh = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/compass\" gh";
|
||||||
crun = "compass workspace run";
|
crun = "compass workspace run";
|
||||||
ctest = "compass workspace test";
|
ctest = "compass workspace test --extra-cmd-args=\"--test_output=errors\"";
|
||||||
cylint = "./scripts/run_yaml_lint.py";
|
cylint = "./scripts/run_yaml_lint.py";
|
||||||
cpip = "compass workspace run src/python3/uc/tools:run_pip_compile";
|
cpip = "compass workspace run src/python3/uc/tools:run_pip_compile";
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ if platform == "darwin":
|
|||||||
$PATH.append(Path("/opt/homebrew/bin/"))
|
$PATH.append(Path("/opt/homebrew/bin/"))
|
||||||
$PATH.append(Path("/run/current-system/sw/bin"))
|
$PATH.append(Path("/run/current-system/sw/bin"))
|
||||||
$PATH.append(Path("/nix/var/nix/profiles/default/bin"))
|
$PATH.append(Path("/nix/var/nix/profiles/default/bin"))
|
||||||
|
$PATH.append(Path("/usr/local/bin"))
|
||||||
|
|||||||
+17
-6
@@ -8,7 +8,11 @@
|
|||||||
./printing.nix
|
./printing.nix
|
||||||
./virt.nix
|
./virt.nix
|
||||||
];
|
];
|
||||||
programs.steam.enable = true;
|
programs = {
|
||||||
|
steam.enable = true;
|
||||||
|
nix-ld.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
networking.hostName = "jude";
|
networking.hostName = "jude";
|
||||||
networking.enableIPv6 = false;
|
networking.enableIPv6 = false;
|
||||||
#systemd.oomd.enable = false;
|
#systemd.oomd.enable = false;
|
||||||
@@ -17,19 +21,26 @@
|
|||||||
greg.kde.enable = false;
|
greg.kde.enable = false;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
busybox
|
||||||
|
gimp
|
||||||
|
gnucash
|
||||||
|
flock
|
||||||
|
ffmpeg
|
||||||
|
handbrake
|
||||||
|
libtheora
|
||||||
|
makemkv
|
||||||
|
oathToolkit
|
||||||
|
synology-drive-client
|
||||||
|
vagrant
|
||||||
|
|
||||||
# Video/Audio data composition framework tools like "gst-inspect", "gst-launch" ...
|
# Video/Audio data composition framework tools like "gst-inspect", "gst-launch" ...
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
# Common plugins like "filesrc" to combine within e.g. gst-launch
|
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
# Specialized plugins separated by quality
|
|
||||||
gst_all_1.gst-plugins-good
|
gst_all_1.gst-plugins-good
|
||||||
gst_all_1.gst-plugins-bad
|
gst_all_1.gst-plugins-bad
|
||||||
gst_all_1.gst-plugins-ugly
|
gst_all_1.gst-plugins-ugly
|
||||||
# Plugins to reuse ffmpeg to play almost every video format
|
|
||||||
gst_all_1.gst-libav
|
gst_all_1.gst-libav
|
||||||
# Support the Video Audio (Hardware) Acceleration API
|
|
||||||
gst_all_1.gst-vaapi
|
gst_all_1.gst-vaapi
|
||||||
oathToolkit
|
|
||||||
];
|
];
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
@@ -18,12 +18,13 @@
|
|||||||
|
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
# Scheduling of them is different in nixos vs nix-darwin, so check for
|
||||||
|
# the extra details there
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = (if lib.strings.hasSuffix "darwin" pkgs.system then false else true);
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
keep-outputs = true;
|
keep-outputs = true;
|
||||||
keep-derivations = true;
|
keep-derivations = true;
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
hms # My own home manager switcher
|
hms # My own home manager switcher
|
||||||
htop
|
htop
|
||||||
killall
|
killall
|
||||||
|
lshw
|
||||||
nano
|
nano
|
||||||
pciutils
|
pciutils
|
||||||
pwgen
|
pwgen
|
||||||
|
|||||||
@@ -7,4 +7,5 @@
|
|||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
};
|
};
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
nix.gc.interval.Hour = 24;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
|
|
||||||
|
nix.gc.dates = "weekly";
|
||||||
|
|
||||||
# I am a fan of network manager, myself
|
# I am a fan of network manager, myself
|
||||||
networking = {
|
networking = {
|
||||||
search = [
|
search = [
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ in rec {
|
|||||||
xonsh-apipenv = cp ./xonsh-apipenv.nix {};
|
xonsh-apipenv = cp ./xonsh-apipenv.nix {};
|
||||||
xonsh-direnv = cp ./xonsh-direnv.nix {};
|
xonsh-direnv = cp ./xonsh-direnv.nix {};
|
||||||
xontrib-vox = cp ./xonsh-vox.nix {};
|
xontrib-vox = cp ./xonsh-vox.nix {};
|
||||||
|
copier = cp ./copier.nix {
|
||||||
|
inherit (python-final)
|
||||||
|
iteration-utilities
|
||||||
|
jinja2-ansible-filters
|
||||||
|
pyyaml-include;
|
||||||
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -60,6 +66,7 @@ in rec {
|
|||||||
pkgs = final.pkgs;
|
pkgs = final.pkgs;
|
||||||
};
|
};
|
||||||
template = prev.callPackage ./template.nix { };
|
template = prev.callPackage ./template.nix { };
|
||||||
|
|
||||||
xonsh = prev.xonsh.overridePythonAttrs (old: rec{
|
xonsh = prev.xonsh.overridePythonAttrs (old: rec{
|
||||||
python3 = final.gregpy;
|
python3 = final.gregpy;
|
||||||
propagatedBuildInputs = with final.gregpy.pkgs; old.propagatedBuildInputs ++ [
|
propagatedBuildInputs = with final.gregpy.pkgs; old.propagatedBuildInputs ++ [
|
||||||
@@ -68,10 +75,4 @@ in rec {
|
|||||||
xontrib-vox
|
xontrib-vox
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
#bitwarden = macOver ./mac/bitwarden.nix "bitwarden";
|
|
||||||
#gnucash = macOver ./mac/gnucash.nix "gnucash";
|
|
||||||
#handbrake = macOver ./mac/handbrake.nix "handbrake";
|
|
||||||
#onlyoffice-bin = macOver ./mac/onlyoffice-bin.nix "onlyoffice-bin";
|
|
||||||
#vlc = macOver ./mac/vlc.nix "vlc";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
{ stdenv, fetchurl,
|
|
||||||
undmg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "2022.10.1";
|
|
||||||
pname = "Bitwarden";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
undmg
|
|
||||||
];
|
|
||||||
sourceRoot = ".";
|
|
||||||
phases = [
|
|
||||||
"unpackPhase"
|
|
||||||
"installPhase"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/Applications"
|
|
||||||
cp -r Bitwarden*.app "$out/Applications"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "Bitwarden-${version}.dmg";
|
|
||||||
url = "https://github.com/bitwarden/clients/releases/download/desktop-v${version}/Bitwarden-${version}-universal.dmg";
|
|
||||||
sha256 = "sha256-6O8xaGBaG4d6l9QRtGM5wj9OCMFy87dH8N1MfEBBjck=";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Bitwarden, an open source password management tool";
|
|
||||||
homepage = "https://bitwarden.com";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{ stdenv, fetchurl,
|
|
||||||
undmg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "4.12";
|
|
||||||
pname = "GnuCash";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
undmg
|
|
||||||
];
|
|
||||||
sourceRoot = ".";
|
|
||||||
phases = [
|
|
||||||
"unpackPhase"
|
|
||||||
"installPhase"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/Applications"
|
|
||||||
cp -r Gnucash*.app "$out/Applications"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "${pname}-${version}.dmg";
|
|
||||||
url = "https://sourceforge.net/projects/gnucash/files/gnucash%20(stable)/${version}/Gnucash-Intel-${version}-1.dmg";
|
|
||||||
sha256 = "sha256-GXsGOk+F/QdcD19ZmZmor0upCFHa7iy3Hs4CLbiby1M=";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "GnuCash is free accounting software for your local machine";
|
|
||||||
homepage = "https://www.gnucash.org";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{ stdenv, fetchurl,
|
|
||||||
undmg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "1.5.1";
|
|
||||||
pname = "HandBrake";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
undmg
|
|
||||||
];
|
|
||||||
sourceRoot = ".";
|
|
||||||
phases = [
|
|
||||||
"unpackPhase"
|
|
||||||
"installPhase"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/Applications"
|
|
||||||
cp -r ${pname}*.app "$out/Applications"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "${pname}-${version}.dmg";
|
|
||||||
url = "https://github.com/HandBrake/HandBrake/releases/download/${version}/${pname}-${version}.dmg";
|
|
||||||
sha256 = "sha256-dnyxYxTjhpxCz/eNuSvK16f6qGHHD5exMm/jaGxith8=";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "HandBrake is an open source video transcoder";
|
|
||||||
homepage = "https://handbrake.fr/";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{ stdenv, fetchurl,
|
|
||||||
undmg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "7.2.1";
|
|
||||||
pname = "onlyoffice";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
undmg
|
|
||||||
];
|
|
||||||
sourceRoot = ".";
|
|
||||||
phases = [
|
|
||||||
"unpackPhase"
|
|
||||||
"installPhase"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/Applications"
|
|
||||||
cp -r *.app "$out/Applications"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "${pname}-${version}.dmg";
|
|
||||||
url = "https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${version}/ONLYOFFICE-x86_64.dmg";
|
|
||||||
sha256 = "sha256-dsuTaZ+IqsDE/j78ht0Md5NoqQ090cJ4u5LClu3tSp0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "OnlyOffice provides a suite of Office-like document editors for the desktop and web.";
|
|
||||||
homepage = "https://www.onlyoffice.com/";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{ stdenv, fetchurl,
|
|
||||||
undmg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "3.0.17.3";
|
|
||||||
pname = "vlc";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
undmg
|
|
||||||
];
|
|
||||||
sourceRoot = ".";
|
|
||||||
phases = [
|
|
||||||
"unpackPhase"
|
|
||||||
"installPhase"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/Applications"
|
|
||||||
cp -r *.app "$out/Applications"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "${pname}-${version}.dmg";
|
|
||||||
url = "https://get.videolan.org/vlc/${version}/macosx/${pname}-${version}-intel64.dmg";
|
|
||||||
sha256 = "sha256-zKJn8sUa5WjgLztNimrbqHsr3l8BGiuHxZXBAtifEdg=";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "VLC is a very versatile video player.";
|
|
||||||
homepage = "https://www.videolan.org/";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -22,6 +22,8 @@ buildPythonPackage rec {
|
|||||||
maintainers = [];
|
maintainers = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patchPhase = "sed -i -e 's/^dependencies.*$/dependencies = []/' pyproject.toml";
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python3Packages
|
||||||
|
, glibcLocales
|
||||||
|
, coreutils
|
||||||
|
, git
|
||||||
|
}:
|
||||||
|
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "xonsh";
|
||||||
|
version = "0.14.0";
|
||||||
|
|
||||||
|
# fetch from github because the pypi package ships incomplete tests
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "xonsh";
|
||||||
|
repo = "xonsh";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
sha256 = "sha256-ZrPKKa/vl06QAjGr16ZzKF/DAByFHr6ze2WVOCa+wf8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
LC_ALL = "en_US.UTF-8";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -ie "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
|
||||||
|
sed -ie "s|SHELL=xonsh|SHELL=$out/bin/xonsh|" tests/test_integrations.py
|
||||||
|
|
||||||
|
sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' tests/test_integrations.py
|
||||||
|
sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' scripts/xon.sh
|
||||||
|
find scripts -name 'xonsh*' -exec sed -i -e "s|env -S|env|" {} \;
|
||||||
|
find -name "*.xsh" | xargs sed -ie 's|/usr/bin/env|${coreutils}/bin/env|'
|
||||||
|
patchShebangs .
|
||||||
|
|
||||||
|
substituteInPlace scripts/xon.sh \
|
||||||
|
--replace 'python' "${python3Packages.python}/bin/python"
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--prefix PYTHONPATH : ${placeholder "out"}/lib/${python3Packages.python.libPrefix}/site-packages"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/xonsh \
|
||||||
|
$makeWrapperArgs
|
||||||
|
'';
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
# fails on sandbox
|
||||||
|
"test_colorize_file"
|
||||||
|
"test_loading_correctly"
|
||||||
|
"test_no_command_path_completion"
|
||||||
|
"test_bsd_man_page_completions"
|
||||||
|
"test_xonsh_activator"
|
||||||
|
# fails on non-interactive shells
|
||||||
|
"test_capture_always"
|
||||||
|
"test_casting"
|
||||||
|
"test_command_pipeline_capture"
|
||||||
|
"test_dirty_working_directory"
|
||||||
|
"test_man_completion"
|
||||||
|
"test_vc_get_branch"
|
||||||
|
"test_bash_and_is_alias_is_only_functional_alias"
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
# fails on sandbox
|
||||||
|
"tests/completers/test_command_completers.py"
|
||||||
|
"tests/test_ptk_highlight.py"
|
||||||
|
"tests/test_ptk_shell.py"
|
||||||
|
# fails on non-interactive shells
|
||||||
|
"tests/prompt/test_gitstatus.py"
|
||||||
|
"tests/completers/test_bash_completer.py"
|
||||||
|
];
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
HOME=$TMPDIR
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeCheckInputs = [ glibcLocales git ] ++
|
||||||
|
(with python3Packages; [ pyte pytestCheckHook pytest-mock pytest-subprocess ]);
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ ply prompt-toolkit pygments ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A Python-ish, BASHwards-compatible shell";
|
||||||
|
homepage = "https://xon.sh/";
|
||||||
|
changelog = "https://github.com/xonsh/xonsh/raw/${version}/CHANGELOG.rst";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; [ vrthra ];
|
||||||
|
};
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
shellPath = "/bin/xonsh";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user