nixify dependencies

This commit is contained in:
2025-08-23 22:51:35 +02:00
parent 722bb55955
commit 79b566911a
6 changed files with 76 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

2
.gitignore vendored
View File

@@ -54,3 +54,5 @@ dkms.conf
*.zip
*.pdf
*.bmp
!main*

13
Makefile Normal file
View File

@@ -0,0 +1,13 @@
build:
gcc main.c bitmap.c -o main -O3
run:
make build
./main
show:
make run
feh after.bmp
convert:
magick after.bmp after.png # for showing image in pdf

1
exercise0/Makefile Normal file
View File

@@ -0,0 +1 @@
include ../Makefile

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

32
flake.nix Normal file
View File

@@ -0,0 +1,32 @@
{
description = "dependencies for parallel processing in c";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
gnumake
feh
feh
imagemagick_light
typst
typstyle
zip
unzip
];
shellHook = ''
echo welcome!
'';
};
};
}