Skip to content

Instantly share code, notes, and snippets.

@Valodim
Created July 5, 2021 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Valodim/4dd4d052f6f1124afcd1729b3d28c5a5 to your computer and use it in GitHub Desktop.
Save Valodim/4dd4d052f6f1124afcd1729b3d28c5a5 to your computer and use it in GitHub Desktop.
openstacksdk nix
{ stdenv
, buildPythonPackage
, fetchPypi
, pbr
, pyyaml
, appdirs
, requestsexceptions
, jsonpatch
, munch
, decorator
, jmespath
, iso8601
, netifaces
, cryptography
, requests
, stevedore
, dogpile_cache
, isPy3k
}:
let
os-service-types = buildPythonPackage rec {
version = "1.7.0";
pname = "os-service-types";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-MYACmagiOTY5lbkfHr+RBqx3WFQqHk723HN6WTKHjGw=";
};
propagatedBuildInputs = [ pbr ];
doCheck = false;
};
keystoneauth1 = buildPythonPackage rec {
version = "4.3.1";
pname = "keystoneauth1";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-k2BUMKbRQk8xZZvFaF6dwb6aYlTojJnwDP/ApgxkimQ=";
};
propagatedBuildInputs = [
pbr
iso8601
requests
stevedore
os-service-types
];
doCheck = false;
};
in
buildPythonPackage rec {
version = "0.57.0";
pname = "openstacksdk";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-cDAtlBC62uf4j9g8MFZGH38QM8FXGS9BoBNEYdXiGCI=";
};
propagatedBuildInputs = [
pbr
pyyaml
appdirs
requestsexceptions
jsonpatch
os-service-types
keystoneauth1
munch
decorator
jmespath
iso8601
netifaces
cryptography
dogpile_cache
];
doCheck = false;
}
@Valodim
Copy link
Author

Valodim commented Jul 5, 2021

Works for me with nixpkgs 21.05.

here's a simple tested shell.nix to use this:

let
  pkgs = import (builtins.fetchTarball {
    name = "nixos-21.05-2021-06-15";
    url = "https://github.com/nixos/nixpkgs/archive/1f91fd1040667e9265a760b0347f8bc416249da7.tar.gz";
    sha256 = "sha256-krXZQ0lObduC95f40K3JwIT//VIBpXBwVNclqh5njtE=";
  }) { };
  openstacksdk = pkgs.python3Packages.callPackage (import ./openstacksdk.nix) {  };
in
  pkgs.mkShell {
    buildInputs = with pkgs; [
      openstacksdk
    ];
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment