Browse Source

Add unpack utility

Sven Slootweg 1 year ago
parent
commit
38e1081cb0
1 changed files with 11 additions and 0 deletions
  1. 11 0
      configuration/lib/unpack.nix

+ 11 - 0
configuration/lib/unpack.nix

@ -0,0 +1,11 @@
1
{ pkgs, ... }:
2
	sourceArchive:
3
		pkgs.stdenv.mkDerivation {
4
			name = "unpack-temp";
5
			src = sourceArchive;
6
7
			buildCommand = ''
8
				mkdir -p $out
9
				tar -xzvf $src -C $out
10
			'';
11
		}