Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 40d86b8

Browse files
committed
Fix awscli package set
1 parent ef6994c commit 40d86b8

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

examples/awscli_override.nix

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
{ pkgs, python }:
2-
3-
self: super: {
4-
"awscli" = python.overrideDerivation super."awscli" (old: {
5-
propagatedBuildInputs = old.propagatedBuildInputs ++ [
6-
pkgs.groff
7-
pkgs.less
8-
];
9-
});
10-
}
2+
with pkgs.lib;
3+
let
4+
specificOverrides = self: super:
5+
{
6+
"awscli" = python.overrideDerivation super."awscli" (old: {
7+
propagatedBuildInputs = old.propagatedBuildInputs ++ [
8+
pkgs.groff
9+
pkgs.less
10+
];
11+
});
12+
"jmespath" = python.overrideDerivation super."jmespath" (old: {
13+
postInstall = ''
14+
chmod +x $out/bin/jp.pyc
15+
'';
16+
});
17+
};
18+
commonOverrides = self: super:
19+
mapAttrs
20+
(name: drv: python.overrideDerivation super."${name}" (old: {
21+
postInstall =
22+
( if builtins.hasAttr "postInstall" old
23+
then old.postInstall
24+
else ""
25+
) + ''
26+
rm -f $out/bin/*.pyc # hey emacs */
27+
'';
28+
}))
29+
super;
30+
in
31+
composeExtensions commonOverrides specificOverrides

0 commit comments

Comments
 (0)