commit ad9e6ed2d74299697d1cf961c6b390fcc8d8bd08 Author: ef Date: Mon Sep 30 20:24:21 2024 +0200 Initial commit diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ad01f94 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1727540905, + "narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "fbca5e745367ae7632731639de5c21f29c8744ed", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..edfd269 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "pyDataverse python package"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.pyDataverse = let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + in + pkgs.python3Packages.buildPythonPackage rec { + pname = "pyDataverse"; + version = "0.3.4"; + + src = pkgs.fetchFromGitHub { + owner = "gdcc"; + repo = "pyDataverse"; + rev = "v0.3.4"; + hash = "sha256-YyIN4PNEhPOwMHjD4rg0PljSj7BZAYlT0g2Ll1V8xHk="; + }; + + format = "pyproject"; + + propagatedBuildInputs = with pkgs.python3Packages; [ + requests + jsonschema + poetry-core + httpx + ]; + }; + + packages.x86_64-linux.default = self.packages.x86_64-linux.pyDataverse; + }; +}