aboutsummaryrefslogtreecommitdiff
path: root/.vim/snippets
diff options
context:
space:
mode:
Diffstat (limited to '.vim/snippets')
-rw-r--r--.vim/snippets/package.nix27
-rw-r--r--.vim/snippets/shell.nix24
2 files changed, 42 insertions, 9 deletions
diff --git a/.vim/snippets/package.nix b/.vim/snippets/package.nix
new file mode 100644
index 0000000..31cb944
--- /dev/null
+++ b/.vim/snippets/package.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+ pname = "";
+ version = "";
+
+ src = fetchgit {
+ rev = version;
+ url = "";
+ sha256 = "";
+ };
+
+ dontBuild = true;
+
+ installPhase = ''
+ runHook preInstall
+ mkdir "$out"
+ runHook postInstall
+ '';
+
+ meta = {
+ homepage = "";
+ description = "";
+ license = lib.licenses.mit;
+ platforms = lib.platforms.linux;
+ };
+}
diff --git a/.vim/snippets/shell.nix b/.vim/snippets/shell.nix
index 6647b8c..2e58365 100644
--- a/.vim/snippets/shell.nix
+++ b/.vim/snippets/shell.nix
@@ -1,16 +1,22 @@
let
- name = "";
-
+ name = "nix-shell.pure";
pkgs = import <nixpkgs> { };
-in pkgs.mkShell {
+ shell = pkgs.writeShellApplication {
+ inherit name;
+ text = ''
+ /usr/bin/env --ignore-environment /bin/sh -c ${
+ pkgs.writeScript name ''
+ export PS1='\h (${name}) \W \$ '
+ export PATH=${pkgs.lib.strings.makeBinPath [ pkgs.busybox ]}
+ /bin/sh
+ ''
+ };
+ '';
+ };
+in pkgs.mkShell {
inherit name;
-
- buildInputs = [ ];
-
- shellHook = ''
- export PS1='\h (${name}) \W \$ '
- '';
+ shellHook = "exec ${shell}/bin/${shell.name}";
}