From 0d80bed612cffb06332d2acc7bf6ed91d98078c5 Mon Sep 17 00:00:00 2001 From: y-syo Date: Fri, 5 Dec 2025 20:15:24 +0100 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E2=9D=84=EF=B8=8F=E3=80=8D=20nix:=20n?= =?UTF-8?q?ixed=20the=20project.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .envrc | 1 + .gitignore | 4 ++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 6bc45b9..2197a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +.direnv/ */**/a.out */**/*.o +libasm.a +out +tester diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8673494 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "flake": false, + "locked": { + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.11", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7a335fe --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "a test development environment for python"; + + inputs = { + + nixpkgs = { + url = "nixpkgs/nixos-24.11"; + flake = false; + }; + + }; + + outputs = inputs@{ nixpkgs, ... }: + { + devShell = { + x86_64-linux = let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + in pkgs.mkShell { + packages = with pkgs; [ + gcc nasm gnumake + ]; + shellHook = '' + echo -e "\x1B[0;33mentering libasm environment...\x1B[0m" + ''; + }; + }; + }; +}