about summary refs log tree commit diff
path: root/users/aspen/emacs.d/snippets/nix-mode
diff options
context:
space:
mode:
Diffstat (limited to 'users/aspen/emacs.d/snippets/nix-mode')
-rw-r--r--users/aspen/emacs.d/snippets/nix-mode/fetchFromGitHub12
-rw-r--r--users/aspen/emacs.d/snippets/nix-mode/pythonPackage16
-rw-r--r--users/aspen/emacs.d/snippets/nix-mode/sha2567
3 files changed, 35 insertions, 0 deletions
diff --git a/users/aspen/emacs.d/snippets/nix-mode/fetchFromGitHub b/users/aspen/emacs.d/snippets/nix-mode/fetchFromGitHub
new file mode 100644
index 000000000000..d2447e4b5a4d
--- /dev/null
+++ b/users/aspen/emacs.d/snippets/nix-mode/fetchFromGitHub
@@ -0,0 +1,12 @@
+# -*- mode: snippet -*-
+# name: fetchFromGitHub
+# uuid: fetchFromGitHub
+# key: fetchFromGitHub
+# condition: t
+# --
+fetchFromGitHub {
+                owner = "$1";
+                repo = "$2";
+                rev = "$3";
+                sha256 = "0000000000000000000000000000000000000000000000000000";
+}
\ No newline at end of file
diff --git a/users/aspen/emacs.d/snippets/nix-mode/pythonPackage b/users/aspen/emacs.d/snippets/nix-mode/pythonPackage
new file mode 100644
index 000000000000..0a74c21e1857
--- /dev/null
+++ b/users/aspen/emacs.d/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/users/aspen/emacs.d/snippets/nix-mode/sha256 b/users/aspen/emacs.d/snippets/nix-mode/sha256
new file mode 100644
index 000000000000..bc640e5ab09b
--- /dev/null
+++ b/users/aspen/emacs.d/snippets/nix-mode/sha256
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: sha256
+# uuid: sha256
+# key: sha256
+# condition: t
+# --
+sha256 = "0000000000000000000000000000000000000000000000000000";
\ No newline at end of file