about summary refs log tree commit diff
path: root/pkgs/development/python-modules/libsass/default.nix
blob: 85f4b24533e612a91abc87fae29222ded321c0f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, buildPythonPackage
, fetchFromGitHub
, libsass
, six
, pytestCheckHook
, werkzeug
}:

buildPythonPackage rec {
  pname = "libsass";
  version = "0.23.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "sass";
    repo = "libsass-python";
    rev = "refs/tags/${version}";
    hash = "sha256-CiSr9/3EDwpDEzu6VcMBAlm3CtKTmGYbZMnMEjyZVxI=";
  };

  buildInputs = [ libsass ];

  propagatedBuildInputs = [ six ];

  preBuild = ''
    export SYSTEM_SASS=true;
  '';

  nativeCheckInputs = [
    pytestCheckHook
    werkzeug
  ];

  pytestFlagsArray = [ "sasstests.py" ];

  pythonImportsCheck = [ "sass" ];

  meta = with lib; {
    description = "Python binding for libsass to compile Sass/SCSS";
    mainProgram = "pysassc";
    homepage = "https://sass.github.io/libsass-python/";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}