This commit is contained in:
lucy 2025-12-09 11:23:22 +01:00
parent bbcb6c3fd6
commit ec6619b23b
4 changed files with 37 additions and 9 deletions

25
flake.lock generated Normal file
View File

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1764983851,
"narHash": "sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o=",
"rev": "d9bc5c7dceb30d8d6fafa10aeb6aa8a48c218454",
"revCount": 902883,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2511.902883%2Brev-d9bc5c7dceb30d8d6fafa10aeb6aa8a48c218454/019af9e3-4981-798f-83ae-1c022e08ffcc/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -42,8 +42,9 @@
libcxx
];
shellHook = ''
echo "welcome to c++ devshell nyaaa :3"
echo "welcome to c++ devshell nyaaa :3"
'';
NIX_BUILD_SHELL = "zsh";
};
}
);

View File

@ -1,10 +1,10 @@
#include <iostream>
#include <string>
using namespace std;
int main() {
string bla = "hello world";
cout << bla << std::endl;
return 0;
int main(int argc, char **argv) {
for (int i = 0; i <= argc; i++) {
cout << argv[i] << endl;
}
return 0;
}

View File

@ -1,3 +1,5 @@
project('flake', 'cpp',
default_options: ['cpp_std=c++20'])
executable('flake', 'main.cpp')
project('hello',
'cpp',
version: '1.0',
default_options: ['cpp_std=c++20', 'optimization=2'])
executable('hello', 'main.cpp')