stockholm/lass/4lib/default.nix

21 lines
379 B
Nix
Raw Normal View History

2015-08-28 14:30:36 +00:00
{ lib, pkgs, ... }:
2015-10-21 00:23:57 +00:00
with lib;
2015-08-28 14:30:36 +00:00
2015-10-21 00:23:57 +00:00
{
2015-08-28 14:30:36 +00:00
simpleScript = name: content:
pkgs.stdenv.mkDerivation {
inherit name;
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
ln -s ${pkgs.writeScript name content} $out/bin/${name}
'';
};
getDefaultGateway = ip:
concatStringsSep "." (take 3 (splitString "." ip) ++ ["1"]);
2015-08-28 14:30:36 +00:00
}