add first draft
This commit is contained in:
25
examples/buildroot_nix-shell.nix
Normal file
25
examples/buildroot_nix-shell.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
let
|
||||
|
||||
buildroot = pkgs.callPackage ../buildroot.nix {};
|
||||
|
||||
in
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "buildroot-shell";
|
||||
buildInputs = buildroot.makeBuildRoot.paths ++ [
|
||||
buildroot.package
|
||||
buildroot.makeBuildRoot.command
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
shellHook = ''
|
||||
alias make='makeBuildRoot'
|
||||
'';
|
||||
phases = [ "nobuildPhase" ];
|
||||
nobuildPhase = ''
|
||||
echo
|
||||
echo "This derivation is not meant to be built, aborting";
|
||||
echo
|
||||
exit 1
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user