Compare commits

..

No commits in common. "a634e932f6ee9cfd3dd26b393c91b3372e67ae1b" and "ee0d271d6e53f589d288d6b5e6159084976ae670" have entirely different histories.

12 changed files with 16 additions and 122 deletions

View file

@ -1,16 +0,0 @@
all: main
CC = clang
override CFLAGS += -g -Wno-everything -pthread -lm
SRCS = $(shell find . -name '.ccls-cache' -type d -prune -o -type f -name '*.c' -print)
HEADERS = $(shell find . -name '.ccls-cache' -type d -prune -o -type f -name '*.h' -print)
main: $(SRCS) $(HEADERS)
$(CC) $(CFLAGS) $(SRCS) -o "$@"
main-debug: $(SRCS) $(HEADERS)
$(CC) $(CFLAGS) -O0 $(SRCS) -o "$@"
clean:
rm -f main main-debug

View file

@ -1,13 +0,0 @@
{
description = "Flake template for a devShell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in with pkgs; { devShells.default = mkShell { packages = [ clang_12 ccls gdb gnumake ]; }; });
}

View file

@ -3,25 +3,13 @@
outputs = { self }: {
templates = {
c = {
path = ./c;
description = "Template for a C project";
};
package = {
path = ./package;
description = "Template for a nix package";
};
python = {
path = ./python;
description = "Template for a python project";
hello = {
path = ./hello;
description = "Template including hello in shell packages";
};
rust = {
path = ./rust;
description = "Template for a rust project, using oxalica/rust-overlay";
};
shell = {
path = ./shell;
description = "Template for a devShell";
description = "Rust template, using oxalica/rust-overlay";
};
};
};

12
hello/flake.nix Normal file
View file

@ -0,0 +1,12 @@
{
description = "Flake template for a rust project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem
(system: { devShells.default = mkShell { packages = [ hello ]; }; });
}

View file

@ -1,4 +0,0 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
use flake

View file

@ -1,19 +0,0 @@
{
description = "Template for a nix package";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in with pkgs; {
devShells.default = mkShell { packages = [ ]; };
packages = {
default = self.packages."${system}".package;
"package" = pkgs.callPackage ./package.nix { };
};
});
}

View file

@ -1,14 +0,0 @@
{ lib, stdenv }:
stdenv.mkDerivation (finalAttrs: {
pname = "";
version = "";
meta = with lib; {
description = "";
homepage = "";
license = licenses.;
platforms = platforms.all;
};
})

View file

@ -1,4 +0,0 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
use flake

View file

@ -1,19 +0,0 @@
{
description = "Flake template for a python project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in with pkgs; {
devShells.default = mkShell {
buildInputs = [ python310 ];
packages = [ ];
};
});
}

View file

@ -1,4 +0,0 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
use flake

View file

@ -1,13 +0,0 @@
{
description = "Flake template for a devShell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in with pkgs; { devShells.default = mkShell { packages = [ hello ]; }; });
}