51 lines
No EOL
1.4 KiB
Nix
51 lines
No EOL
1.4 KiB
Nix
{
|
|
description = "CSCI200 Lab 6C";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = { nixpkgs, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in {
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
sfml
|
|
];
|
|
|
|
packages = with pkgs; [
|
|
gcc
|
|
clang-tools
|
|
];
|
|
};
|
|
|
|
packages.default = pkgs.stdenv.mkDerivation rec {
|
|
pname = "A6";
|
|
version = "1";
|
|
|
|
src = nixpkgs.lib.fileset.toSource {
|
|
root = ./.;
|
|
fileset = nixpkgs.lib.fileset.unions [ ./main.cpp ./Makefile ./mazePack ];
|
|
};
|
|
|
|
buildInputs = with pkgs; [
|
|
sfml
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
gcc
|
|
];
|
|
|
|
buildPhase = ''
|
|
make
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp ./${pname} $out/bin/
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
});
|
|
} |