From 6d19c2b967f22f7644dd2c53c7e8cf10b4823ad8 Mon Sep 17 00:00:00 2001 From: xenofem Date: Wed, 25 May 2022 09:43:20 -0400 Subject: [PATCH] add cli program into flake --- cli/requirements.txt | 2 -- cli/setup.py | 12 ++++++++++++ cli/{transbeam.py => transbeam-cli} | 0 flake.nix | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) delete mode 100644 cli/requirements.txt create mode 100644 cli/setup.py rename cli/{transbeam.py => transbeam-cli} (100%) diff --git a/cli/requirements.txt b/cli/requirements.txt deleted file mode 100644 index 8c73512..0000000 --- a/cli/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tqdm -websockets diff --git a/cli/setup.py b/cli/setup.py new file mode 100644 index 0000000..fe50274 --- /dev/null +++ b/cli/setup.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +from setuptools import setup + +setup(name='transbeam-cli', + version='0.1', + scripts=['transbeam-cli'], + install_requires=[ + 'tqdm', + 'websockets', + ], +) diff --git a/cli/transbeam.py b/cli/transbeam-cli similarity index 100% rename from cli/transbeam.py rename to cli/transbeam-cli diff --git a/flake.nix b/flake.nix index d76fe2d..ece7d09 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,16 @@ packages."${name}-unwrapped" = project.rootCrate.build; + packages."${name}-cli" = with pkgs.python3Packages; buildPythonApplication { + pname = "${name}-cli"; + version = "0.1"; + propagatedBuildInputs = [ + tqdm + websockets + ]; + src = ./cli; + }; + devShell = pkgs.mkShell { nativeBuildInputs = with pkgs; [ stdenv.cc @@ -57,6 +67,10 @@ cargo cargo-audit cargo-flamegraph + (python3.withPackages (p: with p; [ + tqdm + websockets + ])) ]; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; };