diff --git a/c/Makefile b/c/Makefile deleted file mode 100644 index 76ba218..0000000 --- a/c/Makefile +++ /dev/null @@ -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 \ No newline at end of file diff --git a/c/flake.nix b/c/flake.nix deleted file mode 100644 index 0d416ec..0000000 --- a/c/flake.nix +++ /dev/null @@ -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 ]; }; }); -} diff --git a/flake.nix b/flake.nix index 5b665fa..e3534b2 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; }; }; }; diff --git a/c/.envrc b/hello/.envrc similarity index 100% rename from c/.envrc rename to hello/.envrc diff --git a/hello/flake.nix b/hello/flake.nix new file mode 100644 index 0000000..587a41a --- /dev/null +++ b/hello/flake.nix @@ -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 ]; }; }); +} diff --git a/package/.envrc b/package/.envrc deleted file mode 100644 index e31c306..0000000 --- a/package/.envrc +++ /dev/null @@ -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 diff --git a/package/flake.nix b/package/flake.nix deleted file mode 100644 index 31c3ece..0000000 --- a/package/flake.nix +++ /dev/null @@ -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 { }; - }; - }); -} diff --git a/package/package.nix b/package/package.nix deleted file mode 100644 index 7bad0de..0000000 --- a/package/package.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, stdenv }: - -stdenv.mkDerivation (finalAttrs: { - pname = ""; - version = ""; - - meta = with lib; { - description = ""; - homepage = ""; - license = licenses.; - platforms = platforms.all; - }; -}) - diff --git a/python/.envrc b/python/.envrc deleted file mode 100644 index e31c306..0000000 --- a/python/.envrc +++ /dev/null @@ -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 diff --git a/python/flake.nix b/python/flake.nix deleted file mode 100644 index fa0b613..0000000 --- a/python/flake.nix +++ /dev/null @@ -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 = [ ]; - }; - }); -} diff --git a/shell/.envrc b/shell/.envrc deleted file mode 100644 index e31c306..0000000 --- a/shell/.envrc +++ /dev/null @@ -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 diff --git a/shell/flake.nix b/shell/flake.nix deleted file mode 100644 index a093eee..0000000 --- a/shell/flake.nix +++ /dev/null @@ -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 ]; }; }); -}