diff options
author | EuAndreh <eu@euandre.org> | 2020-11-03 15:01:46 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-11-03 15:03:15 -0300 |
commit | 35cacc9f4a39f44bd92f7b6004ce0fb94fcdd9a2 (patch) | |
tree | 8d5c85145f8e52948378ddd1324404762835a7ea | |
parent | Better space link-listing (diff) | |
download | euandre.org-35cacc9f4a39f44bd92f7b6004ce0fb94fcdd9a2.tar.gz euandre.org-35cacc9f4a39f44bd92f7b6004ce0fb94fcdd9a2.tar.xz |
default.nix: Init packaging mdpo
-rw-r--r-- | default.nix | 3 | ||||
-rw-r--r-- | nix/nixpkgs-next.nix | 45 |
2 files changed, 48 insertions, 0 deletions
diff --git a/default.nix b/default.nix index 8396ffc..c601e0d 100644 --- a/default.nix +++ b/default.nix @@ -3,6 +3,7 @@ let pkgs = import niv-sources.nixpkgs { }; src = pkgs.nix-gitignore.gitignoreSource [ "!.git" ] ./.; utils-i18n = pkgs.callPackage ./utils-i18n.nix { }; + pkgs-next = pkgs.callPackage ./nix/nixpkgs-next.nix { }; jekyllEnv = pkgs.bundlerEnv { name = "jekyll-env"; @@ -10,6 +11,7 @@ let lockfile = ./Gemfile.lock; gemset = ./gemset.nix; }; + projectBuildInputs = with pkgs; [ jekyllEnv @@ -23,6 +25,7 @@ let (hunspellWithDicts (with utils-i18n.dicts; [ en pt fr eo ])) ]; in rec { + inherit (pkgs-next) mdpo pymd4c md4c; site = pkgs.stdenv.mkDerivation { inherit src; name = "website-site"; diff --git a/nix/nixpkgs-next.nix b/nix/nixpkgs-next.nix new file mode 100644 index 0000000..738d19c --- /dev/null +++ b/nix/nixpkgs-next.nix @@ -0,0 +1,45 @@ +{ pkgs }: rec { + md4c = pkgs.stdenv.mkDerivation rec { + pname = "md4c"; + version = "release-0.4.6"; + src = pkgs.fetchFromGitHub { + owner = "mity"; + repo = "md4c"; + rev = version; + sha256 = "0km84rmcrczq4n87ryf3ffkfbjh4jim361pbld0z8wgp60rz08dh"; + }; + nativeBuildInputs = with pkgs; [ cmake ]; + outputs = [ "bin" "dev" "out" ]; + }; + + pymd4c = with pkgs.python3.pkgs; + buildPythonPackage rec { + pname = "pymd4c"; + version = "0.4.6.0b1"; + src = fetchPypi { + inherit pname version; + sha256 = "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"; + }; + nativeBuildInputs = with pkgs; [ # cmake + md4c.dev + cython + pkgconfig + setuptools_scm + ]; + propagatedBuildInputs = with pkgs.python3Packages; [ flake8 ]; + + LDFLAGS = "-L${md4c.dev}/lib"; + CFLAGS = "-I${md4c.dev}/include"; + }; + + mdpo = with pkgs.python3.pkgs; + buildPythonPackage rec { + pname = "mdpo"; + version = "0.2.36"; + src = fetchPypi { + inherit pname version; + sha256 = "0gp8wi5c2x3yqslipvkm8m1wvnyji5g52v4195871dhb93kzyzv0"; + }; + propagatedBuildInputs = with pkgs.python3Packages; [ polib pymd4c ]; + }; +} |