Last active
October 11, 2017 13:06
-
-
Save oscarduignan/6ce341dd02061b7cfd295a8ba7b8b826 to your computer and use it in GitHub Desktop.
Get the latest version of docker-compose with nixpkgs which requires overriding texttable dependency version (using overlays)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self: super: | |
let | |
docker_compose = super.docker_compose.override (oldAttrs: { | |
texttable = super.python.pkgs.buildPythonPackage rec { | |
name = "texttable-0.9.1"; | |
src = super.fetchurl { | |
url = "mirror://pypi/t/texttable/${name}.tar.gz"; | |
sha256 = "119041773ff03596b56392532f9315cb3a3116e404fd6f36e76a7dc088d95c79"; | |
}; | |
}; | |
}); | |
in { | |
docker_compose = docker_compose.overrideDerivation (oldAttrs: rec { | |
name = "docker-compose-1.16.1"; | |
src = super.fetchurl { | |
url = "mirror://pypi/d/docker-compose/${name}.tar.gz"; | |
sha256 = "fb46a6a2c4d193a3ff1e4d7208eea920b629c81dc92257c87f3f93095cfb0bdf"; | |
}; | |
}); | |
python27Packages = super.python27Packages // { | |
inherit (self) docker_compose; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got some feedback on https://gist.github.com/oscarduignan/20991f9289403eb3ec81e5f281b2df66 which uses packageOverrides and it was suggested to use overlays instead - so have scrounged some info and had a go at doing that.
Stick this file in
~/.config/nixpkgs/latest_docker_compose.nix
and you can then donix-env -i docker-compose
and get the latest docker-compose installed. Alongside this I have also moved my "buildEnv" composed environments into an~/.config/nixpkgs/environments.nix
so I can donix-env -i allTools
which just installs all the packages I want (docker-compose, git, etc) in one command. Or if I don't want to install it I can just donix-shell -p devTools
, here's an example of that file:The
~/.config/nixpkgs/config.nix
now for me just containsI need to look more into nix-shell I think next.