File: package_github

package info (click to toggle)
yasnippet-snippets 1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,328 kB
  • sloc: lisp: 127; sh: 13; ada: 5; makefile: 2; python: 2
file content (82 lines) | stat: -rw-r--r-- 1,354 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- mode: snippet -*-
# name: package github
# key: pg
# --
{ lib
, stdenv
, fetchFromGitHub
, $1
, $2
}:

stdenv.mkDerivation rec {
  pname = "$3";
  version = "$4";

  src = fetchFromGitHub {
    owner = "$5";
    repo = ${6:pname};
    rev = "${7:v\$\{version\}}";
    sha256 = "${8:\$\{lib.fakeSha256\}}";
  };

  nativeBuildInputs = [ ${1:$(replace-regexp-in-string "  *" " "(subst-char-in-string ?, ? yas-text))} ];
  buildInputs = [
    ${2:$(replace-regexp-in-string "  *" " "(subst-char-in-string ?, ? yas-text))}
  ];

  meta = with lib; {
    homepage = "https://${9:github.com/$5/$3}";
    description = "$10";
    longDescription = ''
      $11
    '';
    license = licenses.${12:$$
  (yas-choose-value '(
    "agpl3"
    "asl20"
    "bsd1"
    "bsd2"
    "bsd3"
    "free"
    "gpl2"
    "gpl2Only"
    "gpl2Plus"
    "gpl3"
    "gpl3Only"
    "gpl3Plus"
    "isc"
    "lgpl21Only"
    "lgpl21Plus"
    "lgpl2Only"
    "lgpl2Plus"
    "lgpl3"
    "lgpl3Only"
    "mit"
    "mpl20"
    "ofl"
    "unfree"
  ))};
    maintainers = with maintainers; [ $12 ];
    platforms = platforms.${13:$$
  (yas-choose-value '(
    "all"
    "allBut"
    "arm"
    "cygwin"
    "darwin"
    "freebsd"
    "gnu"
    "i686"
    "illumos"
    "linux"
    "mesaPlatforms"
    "mips"
    "netbsd"
    "none"
    "openbsd"
    "unix"
    "x86"
  ))};
  };
}