change basically everything
It's a good thing that I'm not collaborating with anyone on this repository, because this is REALLY bad practice.
This commit is contained in:
parent
a3b53b180c
commit
afb4b62827
24 changed files with 68 additions and 187 deletions
43
bash/nixpkgs/flake.lock
generated
43
bash/nixpkgs/flake.lock
generated
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722073938,
|
||||
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
packages = eachSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
soe = pkgs.callPackage ./package.nix {};
|
||||
default = self.packages.${system}.soe;
|
||||
hello = pkgs.callPackage ./package.nix {};
|
||||
default = self.packages.${system}.hello;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
3
bash/nixpkgs/hello
Executable file
3
bash/nixpkgs/hello
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Hello, World!"
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
{ stdenv
|
||||
{ stdenvNoCC
|
||||
, bash
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "soe";
|
||||
version = "1.0";
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "hello";
|
||||
version = "0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
|
|
@ -12,6 +12,6 @@ stdenv.mkDerivation {
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp soe $out/bin
|
||||
cp hello $out/bin
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -n "Primes up to: "
|
||||
read num
|
||||
echo
|
||||
|
||||
nums=()
|
||||
for i in `seq 2 $num`; do
|
||||
nums+=($i)
|
||||
done
|
||||
|
||||
unset nums[-1]
|
||||
|
||||
while [ -n "$nums" ]; do
|
||||
prime=${nums[0]}
|
||||
echo -n "$prime "
|
||||
nums_=()
|
||||
for elem in "${nums[@]}"; do
|
||||
[ $(( $elem % $prime )) -eq 0 ] || nums_+=($elem)
|
||||
done
|
||||
nums=(${nums_[@]})
|
||||
done
|
||||
|
||||
echo
|
||||
Loading…
Add table
Add a link
Reference in a new issue