nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p curl bundix git libiconv libpcap libxml2 libxslt pkg-config postgresql ruby.devEnv sqlite xmlstarlet nix-update
3
4set -eu -o pipefail
5cd "$(dirname "$(readlink -f "$0")")"
6
7latest=$(curl https://github.com/rapid7/metasploit-framework/tags.atom | xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n | head -n1)
8echo "Updating metasploit to $latest"
9
10sed -i "s#refs/tags/.*#refs/tags/$latest\"#" Gemfile
11
12bundler install
13bundix
14sed -i '/[ ]*dependencies =/d' gemset.nix
15
16# Hacks
17sed -i 's/nokogiri = {/nokogiri = {\n dependencies = ["mini_portile2" "racc"];/g' gemset.nix
18
19cd "../../../../"
20nix-update metasploit --version "$latest"