Add awscli2 to home.nix from nixpkgs (#22)

* Add awscli2 to home.nix from nixpkgs

* Remove golint
This commit is contained in:
Dave Gallant
2020-07-12 19:42:25 -04:00
committed by GitHub
parent a1f3b6a98e
commit e036b27630
3 changed files with 27 additions and 95 deletions

View File

@@ -1,12 +1,8 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
programs.home-manager.enable = true;
home = { home = {
username = "dgallant";
homeDirectory = "/home/dgallant";
stateVersion = "20.09";
sessionVariables = { sessionVariables = {
EDITOR = "vim"; EDITOR = "vim";
LOCALE = "en_US.UTF8"; LOCALE = "en_US.UTF8";
@@ -23,9 +19,10 @@
firefox-devedition-bin firefox-devedition-bin
fzf fzf
gimp gimp
git
glibcLocales glibcLocales
gnumake
go go
golint
google-cloud-sdk google-cloud-sdk
gradle gradle
groovy groovy
@@ -34,25 +31,24 @@
jdk jdk
jetbrains.idea-community jetbrains.idea-community
jq jq
libreoffice
maven maven
nixpkgs-fmt nixpkgs-fmt
nmap nmap
openvpn openvpn
pavucontrol pinentry-curses
polybar
postman postman
python38 python38
pinentry-curses
ripgrep ripgrep
rtv
rustup rustup
shellcheck shellcheck
shfmt shfmt
signal-desktop signal-desktop
slack slack
spotify spotify
ssm-session-manager-plugin
stalonetray
terraform terraform
terraform-lsp
tflint tflint
tmux tmux
tree tree
@@ -61,16 +57,22 @@
youtube-dl youtube-dl
zathura zathura
zip zip
zsh-fast-syntax-highlighting
# python packages ## linux
pavucontrol
polybar
ssm-session-manager-plugin
# python
python38Packages.ipython python38Packages.ipython
rfd python38Packages.pip
rtv python38Packages.setuptools
python38Packages.virtualenv
# python dev
black black
# overlays
rfd
# fonts # fonts
dejavu_fonts dejavu_fonts
fira fira
@@ -99,6 +101,8 @@
programs = { programs = {
home-manager.enable = true;
zsh = { zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;

View File

@@ -1,78 +0,0 @@
self: super:
rec {
python3 = with super; super.python3.override {
packageOverrides = self: super: {
botocore = super.botocore.overridePythonAttrs (oldAttrs: rec {
version = "2.0.0dev25";
src = fetchFromGitHub {
owner = "boto";
repo = "botocore";
rev = "bf9a885fa0bc0bba0c3c806eeeb60d9ad5f3e069";
sha256 = "1llshaxpnz9a7mw4kkz9msdgkzz3in5ws3rvd7l077ghj9jkfz9a";
};
});
prompt_toolkit = super.prompt_toolkit.overridePythonAttrs (oldAttrs: rec {
version = "2.0.10";
src = oldAttrs.src.override {
inherit version;
sha256 = "1nr990i4b04rnlw1ghd0xmgvvvhih698mb6lb6jylr76cs7zcnpi";
};
});
};
};
pythonPackages = python3.pkgs;
awscli2 = with self; pythonPackages.buildPythonApplication rec {
pname = "awscli";
version = "2.0.21"; # N.B: if you change this, change botocore to a matching version too
src = fetchFromGitHub {
owner = "aws";
repo = "aws-cli";
rev = version;
sha256 = "1lxkdjsl3w9c621byy3gggadhfrw8xcw37x3xci9qszxqc10b467";
};
postPatch = ''
substituteInPlace setup.py --replace ",<0.16" ""
substituteInPlace setup.py --replace "cryptography>=2.8.0,<=2.9.0" "cryptography>=2.8.0,<2.10"
'';
# No tests included
doCheck = false;
propagatedBuildInputs = with pythonPackages; [
bcdoc
botocore
colorama
cryptography
docutils
groff
less
prompt_toolkit
pyyaml
rsa
ruamel_yaml
s3transfer
six
];
postInstall = ''
mkdir -p $out/etc/bash_completion.d
echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli
mkdir -p $out/share/zsh/site-functions
mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions
rm $out/bin/aws.cmd
'';
passthru.python3 = python3; # for aws_shell
meta = with super.lib; {
homepage = "https://aws.amazon.com/cli/";
description = "Unified tool to manage your AWS services";
license = licenses.asl20;
maintainers = [ ];
};
};
}

View File

@@ -16,6 +16,11 @@ rec {
hash = "sha256:0hg9mgb0hf8ddxbnnrd28a7fxngld7m0fadzidjbj99j0gxvzq6g"; hash = "sha256:0hg9mgb0hf8ddxbnnrd28a7fxngld7m0fadzidjbj99j0gxvzq6g";
}; };
postPatch = ''
substituteInPlace requirements.txt --replace "soupsieve<=2.0" "soupsieve"
substituteInPlace requirements.txt --replace "beautifulsoup4<=4.8.2" "beautifulsoup4"
'';
# No tests included # No tests included
doCheck = false; doCheck = false;
@@ -24,6 +29,7 @@ rec {
click click
colorama colorama
requests requests
soupsieve
]; ];
passthru.python3 = python3; passthru.python3 = python3;