From 35c76e7098111ed0d84aef1bd09f7025ce728b87 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 26 Mar 2020 15:03:25 -0400 Subject: Many updates, too many to count commit messages are for code, not config I guess --- snippets/nix-mode/fetchFromGitHub | 12 ++++++++++++ snippets/nix-mode/pythonPackage | 16 ++++++++++++++++ snippets/nix-mode/sha256 | 7 +++++++ 3 files changed, 35 insertions(+) create mode 100644 snippets/nix-mode/fetchFromGitHub create mode 100644 snippets/nix-mode/pythonPackage create mode 100644 snippets/nix-mode/sha256 (limited to 'snippets/nix-mode') diff --git a/snippets/nix-mode/fetchFromGitHub b/snippets/nix-mode/fetchFromGitHub new file mode 100644 index 000000000000..9b9373573048 --- /dev/null +++ b/snippets/nix-mode/fetchFromGitHub @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: fetchFromGitHub +# uuid: +# key: fetchFromGitHub +# condition: t +# -- +fetchFromGitHub { + owner = "$1"; + repo = "$2"; + rev = "$3"; + sha256 = "0000000000000000000000000000000000000000000000000000"; +} \ No newline at end of file diff --git a/snippets/nix-mode/pythonPackage b/snippets/nix-mode/pythonPackage new file mode 100644 index 000000000000..0a74c21e1857 --- /dev/null +++ b/snippets/nix-mode/pythonPackage @@ -0,0 +1,16 @@ +# key: pypkg +# name: pythonPackage +# condition: t +# -- +${1:pname} = buildPythonPackage rec { + name = "\${pname}-\${version}"; + pname = "$1"; + version = "${2:1.0.0}"; + src = fetchPypi { + inherit pname version; + sha256 = "0000000000000000000000000000000000000000000000000000"; + }; + propagatedBuildInputs = with pythonSelf; [ + $3 + ]; +}; \ No newline at end of file diff --git a/snippets/nix-mode/sha256 b/snippets/nix-mode/sha256 new file mode 100644 index 000000000000..e3d52e1c0201 --- /dev/null +++ b/snippets/nix-mode/sha256 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: sha256 +# uuid: +# key: sha256 +# condition: t +# -- +sha256 = "0000000000000000000000000000000000000000000000000000"; \ No newline at end of file -- cgit 1.4.1