Skip to content

Instantly share code, notes, and snippets.

@petercommand
Created August 7, 2019 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petercommand/7c1ec2df3b452122548587243e0ff642 to your computer and use it in GitHub Desktop.
Save petercommand/7c1ec2df3b452122548587243e0ff642 to your computer and use it in GitHub Desktop.
{}:
let
nixpkgs = import <nixpkgs> {};
unstable = import <nixos-unstable> {};
pkgs = with unstable; {
zettlr = callPackage ./zettlr.nix {};
};
in
pkgs
{ pkgs, stdenv, fetchFromGitHub, electron, makeWrapper }:
let
yarn2nix = pkgs.fetchgit {
url = "https://github.com/moretea/yarn2nix.git";
rev = "3f2dbb08724bf8841609f932bfe1d61a78277232";
sha256 = "142av7dwviapsnahgj8r6779gs2zr17achzhr8b97s0hsl08dcl2";
};
executableName = "zettlr";
version = "1.4.0-beta";
src = pkgs.fetchgit {
url = "https://github.com/Zettlr/Zettlr.git";
rev = "bbe434c0bc75bc9a5c430885789b76ffb7fbda51";
sha256 = "1dh8xn02y9rpapnwwh68f7d4i963ikrykxvzr1cir7qpcwsknf3r";
};
in
with (import "${yarn2nix}/default.nix" { inherit pkgs; });
mkYarnPackage rec {
name = "zettlr-${version}";
inherit version src;
packageJSON = "${src}/package.json";
yarnLock = "${src}/yarn.lock";
nativeBuildInputs = [ makeWrapper ];
meta = with stdenv.lib; {
description = "A Markdown Editor for the 21st Century";
homepage = https://www.zettlr.com/;
inherit (electron.meta) platforms;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment