nix-samples/hello-world-github/default.nix

38 lines
893 B
Nix
Raw Permalink Normal View History

2024-03-17 17:33:12 +01:00
with import <nixpkgs> {}; stdenv.mkDerivation {
name = "hello";
src = fetchFromGitHub {
owner = "emersion";
repo = "hello-wayland";
rev = "5f3a35def81116f0a74fcaf5a421d66c6700482d";
hash = "sha256-gcLR8gosQlPPgFrxqmRQ6/59RjAfJNX6CcsYP+L+A58=";
};
# Dependencies
# buildInputs are for programs and libraries used by the new derivation at run-time
buildInputs = [
wayland
wayland-protocols
];
# nativeBuildInputs are for programs and libraries used at build-time that, if they are a compiler or similar tool,
# produce code to run at run-time—i.e. tools used to build the new derivation
nativeBuildInputs = with pkgs; [
coreutils
gcc
imagemagick
pkg-config
];
configurePhase = ''
echo "Nope"
'';
buildPhase = ''
make
'';
installPhase = ''
mkdir -p "$out/bin"
cp ./hello-wayland "$out/bin/"
'';
}