]> git.scottworley.com Git - snek/commitdiff
Build with nix
authorScott Worley <scottworley@scottworley.com>
Thu, 11 Jun 2020 21:09:45 +0000 (14:09 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 11 Jun 2020 21:10:12 +0000 (14:10 -0700)
This doesn't work:

  $ nix-build .
  $ ./result/bin/snek
  Traceback (most recent call last):
    File "/nix/store/...-python3.7-snek-1.0/bin/.snek-wrapped", line 6, in <module>
      from snek import main
  ModuleNotFoundError: No module named 'snek'

default.nix [new file with mode: 0644]

diff --git a/default.nix b/default.nix
new file mode 100644 (file)
index 0000000..f4a9f9d
--- /dev/null
@@ -0,0 +1,7 @@
+{ pkgs ? import <nixpkgs> { } }:
+pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, }:
+  buildPythonPackage rec {
+    pname = "snek";
+    version = "1.0";
+    src = lib.cleanSource ./.;
+  }) { }