Skip to content
Permalink
Browse files

Upgrade termtosvg

  • Loading branch information...
nmattia committed Jul 1, 2019
1 parent d04a684 commit c95078ee41e92c84b0c2dccb3f742135331b629f
Showing with 75 additions and 41 deletions.
  1. +6 −8 default.nix
  2. +4 −0 nix/default.nix
  3. +18 −16 nix/sources.json
  4. +4 −8 nix/termtosvg.nix
  5. +43 −9 site/niv.svg
@@ -165,17 +165,15 @@ rec
#!${pkgs.stdenv.shell}
set -euo pipefail
export PATH=${haskellPackages.niv}/bin:${pkgs.nix}/bin:$PATH
site=$PWD/site
hash=$(${pkgs.nix}/bin/nix-hash ''${BASH_SOURCE[0]})
pushd $(mktemp -d)
(tail -f /dev/null || true) | ${pkgs.termtosvg}/bin/termtosvg \
-g 82x26 -M 1500 -m 1500 -t window_frame \
-c '${niv-svg-cmds}' niv.svg
${pkgs.gnused}/bin/sed -i "0,/terminal/{s/terminal/$hash/}" niv.svg
niv_svg=$(realpath niv.svg)
popd
${pkgs.termtosvg}/bin/termtosvg \
-g 82x26 -M 500 -m 500 -t window_frame \
-c '${niv-svg-cmds}' $site/niv.svg
cp $niv_svg site/niv.svg
echo done rendering
popd
'';

}
@@ -2,8 +2,12 @@
import sources.nixpkgs
{ overlays =
[ (_: pkgs:
{ inherit sources; }
)
(_: pkgs:
{ termtosvg = pkgs.callPackage ./termtosvg.nix {}; }
)

];
config = {};
}
@@ -1,23 +1,25 @@
{
"nixpkgs": {
"url": "https://github.com/NixOS/nixpkgs-channels/archive/8634c3b619909db7fc747faf8c03592986626e21.tar.gz",
"owner": "NixOS",
"branch": "nixos-19.03",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels",
"owner": "NixOS",
"repo": "nixpkgs-channels",
"type": "tarball",
"rev": "8634c3b619909db7fc747faf8c03592986626e21",
"sha256": "0hcpy4q64vbqmlmnfcavfxilyygyzpwdsss8g3p73ikpic0j6ziq",
"description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels",
"rev": "8634c3b619909db7fc747faf8c03592986626e21"
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/8634c3b619909db7fc747faf8c03592986626e21.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"gitignore": {
"url": "https://github.com/hercules-ci/gitignore/archive/4064e436313191f11969986e66b81cb6bb61bae6.tar.gz",
"owner": "hercules-ci",
"branch": "master",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"repo": "gitignore",
"sha256": "0358wcmgmc5mx4xfr08fxra4k05zvl2qyaix4gdlm7iwcscz609a",
"description": "Nix source function for gitignore that just works",
"rev": "4064e436313191f11969986e66b81cb6bb61bae6"
"termtosvg": {
"branch": "develop",
"description": "Record terminal sessions as SVG animations",
"homepage": "https://nbedos.github.io/termtosvg/",
"owner": "nbedos",
"repo": "termtosvg",
"rev": "525330d7d3d7f55b9ed2344140b9b320552a97a4",
"sha256": "07y39kyabsz88vrf37chcb0d4s5d6knyg95xmq5787vp987f5ii0",
"type": "tarball",
"url": "https://github.com/nbedos/termtosvg/archive/525330d7d3d7f55b9ed2344140b9b320552a97a4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
}
@@ -1,21 +1,17 @@
{ lib, python3Packages }:
{ sources, lib, python3Packages }:

python3Packages.buildPythonApplication rec {
pname = "termtosvg";
version = "0.8.0";
version = "0.0.0";

src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "e3a0a7bd511028c96d242525df807a23e6f22e55b111a7ee861f294a86224b0c";
};
src = sources.termtosvg;

doCheck = false;

propagatedBuildInputs = with python3Packages; [ lxml pyte ];

meta = with lib; {
homepage = https://nbedos.github.io/termtosvg/;
description = "Record terminal sessions as SVG animations";
inherit (sources.termtosvg) homepage description;
license = licenses.bsd3;
maintainers = with maintainers; [ ma27 ];
};

0 comments on commit c95078e

Please sign in to comment.
You can’t perform that action at this time.