nixpkgs/pkgs/development/nim-packages/python/default.nix
Emery Hemingway f8e3247113 nimPackages.spry: init at 0.9.0
Includes new dependency packages:
- nimPackages.python:   1.2
- nimPackages.rocksdb:  0.2.0
- nimPackages.snappy:   0.1.0
- nimPackages.spryvm:   0.9.3
- nimPackages.stew:     0.1.0
- nimPackages.tempfile: 0.1.7
- nimPackages.ui:       0.9.4
2021-11-12 14:02:45 +01:00

26 lines
756 B
Nix

{ lib, buildNimPackage, fetchFromGitHub, python27 }:
buildNimPackage rec {
pname = "python";
version = "1.2";
src = fetchFromGitHub {
owner = "nim-lang";
repo = pname;
rev = "b7c3b2c447a69fdb0a974ba149062e52182fda08";
hash = "sha256-Wl4on0rf4zbNxmwmq/ZkNiPIFCZY+1BdokPQoba2EVI=";
};
postPatch = let pythonLib = "${python27}/lib/libpython2.7.so";
in ''
substituteInPlace src/python.nim \
--replace 'items(LibNames)' "[\"${pythonLib}\"]" \
--replace 'dynlib: dllname' 'dynlib: "${pythonLib}"'
'';
doCheck = true;
meta = with lib;
src.meta // {
description = "Nim wrapper for the Python 2 programming language";
license = [ licenses.mit ];
maintainers = [ maintainers.ehmry ];
};
}