22 lines
384 B
Bash
Executable File
22 lines
384 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2020-2021 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if [ ! -e ./.envrc ]; then
|
|
echo "use nix" > .envrc
|
|
direnv allow
|
|
fi
|
|
if [[ ! -e shell.nix ]] && [[ ! -e default.nix ]]; then
|
|
cat > shell.nix << EOF
|
|
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
];
|
|
}
|
|
EOF
|
|
vim shell.nix
|
|
fi
|