Skip to content

Instantly share code, notes, and snippets.

@Pamplemousse
Created July 31, 2020 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pamplemousse/87086647bcc6057ee7a17276e36650d5 to your computer and use it in GitHub Desktop.
Save Pamplemousse/87086647bcc6057ee7a17276e36650d5 to your computer and use it in GitHub Desktop.
with import <nixpkgs> { };
let
python38WithPackages = python38.withPackages(ps: with ps; [
binwalk
]);
firmware-mod-kit = fetchFromGitHub {
owner = "rampageX";
repo = "firmware-mod-kit";
rev = "0.99";
sha256 = "1vr4s67n01a446qlipnijpkb0pn6q93rvsy0inwx8y6z9qp2jdxg";
};
in
stdenv.mkDerivation rec {
name = "firmware-analysis-environment";
buildInputs = [
python38WithPackages
bash
sasquatch
];
shellHook = ''
mkdir -p firmware-mod-kit
cp ${firmware-mod-kit}/*.sh ./firmware-mod-kit
sed -i 's@/bin/bash@${bash}/bin/bash@' ./firmware-mod-kit/*.sh
'';
exitHook = ''
rm -Rf firmware-mod-kit
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment