From a17c369a02f581a392035b5eadbd9c3c79344d5e Mon Sep 17 00:00:00 2001 From: ef Date: Fri, 8 Nov 2024 17:18:15 +0100 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cc9af5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8dcbdd4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "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..a1c19ff --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "python-lorem python package"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.lorem = let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + in + pkgs.python3Packages.buildPythonPackage rec { + pname = "python-lorem"; + version = "1.3.0.post3"; + + src = pkgs.fetchFromGitHub { + owner = "JarryShaw"; + repo = "lorem"; + rev = "v${version}"; + hash = "sha256-H43DujOJxUefYEHC5QuTtNksph67TGV76OIa/2xkq08="; + }; + }; + + packages.x86_64-linux.default = self.packages.x86_64-linux.lorem; + }; +}